Actor velocity has no z velocity on ramps, causing problem with predictive targeting

Hello. I have a targeting function that can hit a moving target but when the target is on a ramp the velocity of the character lacks a non-zero z component and therefore the shot is calculated as if the target is running straight. I have come up with a solution to adjust fire but I’m curious if there is a better way.

The solution would be to have a slight delay in the aiming procedure to come up with a delta Z of the actor and to adjust target velocity in the formula with said figure. Problem of course is that delay would play into every shot taken.

Try getting velocity like this:

The movement component does its own thing with the sliding collision and does not report Z, indeed.

Excellent. Thank you very much.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.