Alice Community  

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

Reply
 
Thread Tools Display Modes
Absolute Heading
Old
Hydrogen777
Guest
 
Status:
Posts: n/a
Default Absolute Heading - 09-26-2010, 04:14 PM

I'm working on a flight simulator project. Here's the problem. The player needs to be able to control yaw (left/right motion). But simply having the plane turn right and left without rolling right and left doesn't look realistic. But if I make the plane roll as it yaws relative to itself, altitude is affected, which is not the intention. I could adjust the pitch (up/down motion) so that constant altitude is maintained, but this seems overly difficult and complicated.

So I decided to get rid of motion relative to the plane altogether and instead go with absolute coordinates (relative to the world). The plane has properties for speed, theta (angle in the x-y plane, corresponding to yaw), phi (angle from the x-y plane up in the z-direction, corresponding to pitch), and roll. I used trig (spherical coordinates) to get the plane to move properly, and it works very nicely. However, the plane does not change its animation direction at all. I need to make the plane change its absolute heading to match its theta, phi, and roll properties.

But I don't see any methods that change absolute heading - only relative heading, e.g. "turn 1/4 revolution". Is there a method something like "set horizontal angle to 0 as seen by world"?
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Arrow 09-26-2010, 04:37 PM

Unfortunately, no.

But what you could do is have a dummy at the object, vehicled to the camera or whatever, and have "object orient to *dummy*." Or, you could scrap the dummy all together and have "object orient to *camera*" if it works for you.

If you're planning on having the plane actually "move" relative the the camera's field of view (anything other than turning or rolling), then substitute the "orient to" with "set point of view to."

EDIT: 365th post. Yay.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
Hydrogen777
Guest
 
Status:
Posts: n/a
Default 09-26-2010, 06:56 PM

I don't want to orient anything to the camera because the camera is set to follow behind the plane at all times, almost in first-person style.

"But what you could do is have a dummy at the object, vehicled to the camera or whatever . . ."

I like this idea, but now I need a way to move the dummy object to the position of the plane plus the appropriate offset. I don't see any way in Alice to move an object to a point beyond another other object. Also, this still doesn't allow me to animate rolls.
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Post 09-26-2010, 08:11 PM

Hmm.

Perhaps post your world, so I could take a look at it?


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
Hydrogen777
Guest
 
Status:
Posts: n/a
Default 09-26-2010, 08:43 PM

Left and right arrows control yaw. Up and down arrows control pitch. W and S control speed. And A and D control roll. The object "Heading" is the dummy object, but it doesn't do anything yet.

Thanks for your help - I really appreciate it.
Attached Files
File Type: a2w Test Movement.a2w (996.3 KB, 16 views)
   
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.