|
-
bibuti.
 Originally Posted by joshstrike
Assuming you have a constant gravity acting on the character's y-velocity, and assuming the x-velocity is going to be constant throughout the jump, you should be able to take the horizontal distance divided by two and figure out how long in ticks the character will take to complete the second half of the arc in x-distance. If you know that, just create a scratch acceleration var and run it that many times in a loop, adding the value of itself+gravity each time, and the y-position of the end point minus that total gravity should give you the top of a parabola that's halfway between start and finish and at the right height above the endpoint to make the jump look realistic.
Thanks for your reply!
Your explanation almost makes sense to me, but I'm lost when you mention "a scratch acceleration and it run it many times in a loop". The thought of calculating a parabola of motion seems to be the most elegant solution though.
Could you elaborate a bit on this method? Again, thank you for your help.
i'm obsessed with video games.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|