Change Initial Rotation Based on Toss Velocity

I’m still not sure I understand, what it is you want to do, however;

Maybe this will help? (skip passed the C++ code bit)


Looking at your original code, you are using a find look at rotation which takes in a start and target location. You are feeding essentially your normalised velocity in to the target. (not a location)

Reading the tool tip “find look at rotation” is designed to point at a target. The target data you will be feeding in to the target node, where it needs to point to is something like X=0.3, Y=0.3, Z=5000.00 as that is the velocity you set. So you are not pointing to where your target is, you’re telling it to rotate and point at the velocity output…this is not where the target is but the force which you have applied to a projectile.

So you will be feeding something like:

X Roll -135
Y Pitch 89
Z Yaw 44

In to your world rotation, so I can only imagine it does some odd stuff. Your turret is now trying to turn in 3 different directions within the world.

You may well need to use a little more complicated mathematics to work out Velocity + Angle = distance. Or Distance / Velocity = angle? Something like that?