Launching characters but limiting the max height they can reach

I am working on a launching system which is nearly complete but the only issue I have is limiting the height of the launch so that players can not fly around with it. Any ideas on how I can achieve this? For some reason everything I try don’t work!

Could always have a huge invisible plane/volume which only blocks pawns. That might be a simple way to do it. Otherwise I think you could test for location Z and then have the movement stop once you go above that. Without seeing the exact system it’s hard to say but there should be several methods to stop movement or cancel velocity. Real late right now so I might be imagining things, sorry if I am but you should be able to work from . If not, I’ll post in more detail tomorrow.

Does launching take Relative or World location? I think that’s where the issue lies because I’ve tried both and I think I may need both. Perhaps store the ground location and insure that the player doesn’t every exceed ground location + Z Amount to launch in air.

Beyond that I want to aim for a Devil May Cry launch style

As far as I know, it takes a velocity. I know it’s a vector, but instead of thinking of it as a location think of it as a force on each axis. This axis is relative to the player- so X = forward/back, Y = left/right, and Z = up/down (unless you’ve changed something). As far as limiting the height, you could always calculate the upwards force needed to reach ‘ground location + Z’ and simply apply less force in the Z field. If you want a system which has the character kind of float in the air just make sure that you never add more upward force than it takes to get the player from their position to ‘ground location + Z’. Or, if you’ve manipulated gravity scale on the character, have a box trigger which will increase the scale if you enter it. That should ‘push’ the player down. If none of these work, you could also check for a Z value on char location and then don’t apply any further force upward and instead apply force downward. You could make a float variable for this ceiling as well.

So I got it working!

I made a video to show everyone how I did it. There’s still room to improve it and extend it for gameplay. I plan to create something along the lines of the behavior when enemies are launched in DMC Devil May Cry.