View Full Version : Objects Layers
ProfDWG
06-20-2006, 11:32 AM
How do I control the layering of multiple objects in a world? For example, I want a seaplane to fly in front of sailboats on the horizon.
lanceA
06-20-2006, 12:28 PM
Alice comes with several sample worlds. Look at the code for the sample world flightSimulator and use that as a guide. Also when you are setting up your world be sure to use the Quad View to get a good understanding of how one object can be "in front of" another object.
ProfDWG
06-20-2006, 03:34 PM
OK,... I've looked at the flight simulator world but still cannot understand how to make one object go in front of another. Want to give me another hint?
lanceA
06-20-2006, 05:15 PM
You did not mention anything concerning human interaction in your program therefore I am assuming you are not using an event handler for controlling your seaplane. Try experimenting with the proximity functions. They can provide feedback concerning your seaplane's distance to, distance in front of, distance to the left/right, etc. of other objects. Then based upon this feedback write the code to adjust your plane's course/heading appropriately.
I still would suggest setting up the world using the Quad View which will give you a good indication as to the relative position of each object in your world at the start of your application.