Sign in to follow this  
Pasquale Sada

Land on a specific spot

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
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:
[CODE]
vec direction = (E-S).normalized();
[/CODE]

In order to jump up add some value to the upVector:
[CODE]
direction.y +=5; //y is upVector and 5 can whatever even (E.y-S.y)
[/CODE]

Then multiply a direction vector with velocity.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this