Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Objects Layers
Old
ProfDWG
Guest
 
Status:
Posts: n/a
Default Objects Layers - 06-20-2006, 12:32 PM

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.
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 06-20-2006, 01: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.
   
Reply With Quote
Objects Layering
Old
ProfDWG
Guest
 
Status:
Posts: n/a
Default Objects Layering - 06-20-2006, 04: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?
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 06-20-2006, 06: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.

Last edited by lanceA; 06-20-2006 at 06:18 PM.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.