Check for blocking objects on jump

Hey there,

I’d like to be able to predict if my jumping character can reach the gray position, or if he will crash into the block’s pink face.

I thought of a capsule trace amoung the “jumping route” but wasn’t able to recreate the curve of the character flying. May some of you guys have the solution or even a completely different idea on how to predict the characters flight.

Thanks for your time and help! -Dominik

To calculate the curve you can use the* Parabolic Curve* that is fairly easy Parabola - Wikipedia or the Bézier Curve.

Have a look at this tutorial:UE4 Projectile Trajectory Tutorial : Part1 - YouTube
It actually implements a parabolic curve used for Projectile Trajectory.

To get the velocity, you can just get the MovementComponent’s current velocity, and calculate the curve, the Gravity in UE4 is -980 by default.

I hope it helps. :slight_smile:

  • Azarus