If velocity is under certain ammount, push backwards

Hello! I am trying to make a system where if a character is under a certain velocity and running up a loop/ramp/whatever, he gets pushed backwards (I’m just using the jump for testing). It does not work however, and i do not know if its because i messed up the overlap or what. Help would be nice :slight_smile:

What you want to do here is get the vector length and perform your test on it. the values of the vector components (X,Y and Z) will give you the direction. The actual speed of your character is the vector length, you could use something like that for your test :

You could also use VectorLengthXY if you don’t care about the Z value, but I’ve never used it myself.
I hope this helps =)

Well, I certainly got some results from this! I kept using the jump test method, and even with no velocity (XY), I just kept bunny-hopping all over! But its something, right?
And also, would i have to use a collider component rather then a mesh to test if its touching the loop object? Thank you!

It depends on the behaviour you want I guess. I usually like to use Box/Sphere/Capsule Collision as I feel I get more control over my “trigger zone”.

Hm, Alright. Also, may the bunnyhopping be because i set the velocity <= to 1200? Is that too low for, I dunno, 700 acceleration?

That I don’t know ,I guess you will have to test a few values and find if one is giving you better results. You could also print the velocity length in the tick function of your pawn to get a better idea of the values it gives you.

I’m pretty sure it’s because i had the branch set up to the sequence for whatever reason. Now with this fixed, i did the velocity check, it went WAY past the <= value, but no jumping happened what so ever. Another obvious mistake?