Jump to content
  • Advertisement
Sign in to follow this  
Pasquale Sada

Land on a specific spot

This topic is 2203 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,

After a couple of test I've edited the question to make it simple and easy to understand.I have a fixed initial velocity V(Vx,Vy,VZ) and a spot on higher ground E(Ex,Ey,Ez), my character must jump up there and he stands still at S(Sx,Sy,Sz). How Can I find the closest point to the character that can make him achieve the jump?And If the spot Is not available how can check other solutions? Edited by kahl

Share this post


Link to post
Share on other sites
Advertisement
Because you will hit the border of the platform, I forgot to tell that the end location is the center of the platform. I need a parabola and a straight line is not realistic :never saw a platform game where you jump in straight line. I could use a simple vector force V(0,1,1) that makes the character jump forward but It's not my goal. I need to trace a parabola from startpoint to end point taking in account gravity, then plug the vector in my velocity vector so the character can move. . .

Share this post


Link to post
Share on other sites
How about this:

Find a direction vector to the platform:

vec direction = (E-S).normalized();


In order to jump up add some value to the upVector:

direction.y +=5; //y is upVector and 5 can whatever even (E.y-S.y)


Then multiply a direction vector with velocity.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!