Land on a specific spot

Started by
5 comments, last by freyastudio 11 years, 6 months ago
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?
Advertisement
With no limit on angle and force, the quickest way to get somewhere is to go with the as much force as possible in a straight line :P
Then you will miss the target, I need a parabola ;)
Why would you miss the target? You put no limit on the amount of force you can use, so the quickest way to get there is to go in a straight line with infinite force
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. . .
Changed some things to make understandable and easier to answer. Sorry for the inconvenient. . .
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.


This topic is closed to new replies.

Advertisement