Alice Community  

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

Reply
 
Thread Tools Display Modes
Trajectory? Help? Please?
Old
jrage91
Guest
 
Status:
Posts: n/a
Post Trajectory? Help? Please? - 09-03-2007, 10:13 PM

Trajectory seems to be even harder to code than collision detection. Does anyone know how I would be able to code a method that would change the distance an object travels based on the angle it leaves the ground.

For example, If {tube} is at a 90 degree angle, the {sphere} would go straight up and then straight down. But the closer to 45 the tube's angle is, the further away the sphere would land. Also, how can i make the speed of the ascending object decrease as it nears the peak of the shot?

PS. I am a newb to the site, and love what i see. Thanks in advance.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 09-04-2007, 07:42 AM

This requires a little more than just hacking a program together. A litle knowledge of physics would help.

Just solve the equations of motion for the projectile and cause it to move in small increments within a loop. Be sure to set the duration parameter to start and stop abruptly so that it won't appear to move in short increments.
   
Reply With Quote
Old
jrage91
Guest
 
Status:
Posts: n/a
Default 09-06-2007, 05:43 PM

That should work fine actually. I can't beleive I didn't think of that... I am retarded. I was going into a crapload of physics trying to figure that out... and yet, completely unneeded. Thank you.
   
Reply With Quote
Trajectory
Old
hgs
Guest
 
Status:
Posts: n/a
Default Trajectory - 09-11-2007, 10:51 AM

Alternatively, a bodge might be enough. If you do together {move towards target, and do sequentially { move up, then down}} you might find it is good enough, depending on the realism you need.
   
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 ©2021, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.