In house velocity clamp?

Is there a node, or option on the details panel for clamping velocity?

For what? an actor? pawn? character? physics object?

If a pawn or character look in the movement component settings. Physics objects I believe have a limit, but not sure as I’m still on 4.26 physx.

Otherwise you may need to use BP nodes to: get the velocity vector, normalize it, then multiply that by your limit and re-set the velocity to result vector.

1 Like

Its for a physics object
Also, is there another way to define the max velocity without having the input of “Set Linear Velocity” be the direct clamped value? that means that i can make it a desired value with or without interpolation

1 Like

I could be wrong but I don’t think there is a limit value for the velocity for physics objects. In my projects I clamp velocities per tick after calculations. I use c++, but it should be fine on tick for blueprint if you keep it to math functions.

1 Like

It depends on how you apply the velocity. Are you setting it or adding it?
If its set velocity directly to a value, clamping would work with your method but adding wouldn’t or at least can’t seem to find a way

I apply forces/impulses, then do a final clamp using set. I think you are correct, just adding I don’t see a way either.

Mhh, i think i have to sleep on it. I’ll get back to you later tomorrow if i come up with a solution

If you are adding it, you could check velocity, then only add if velocity is below your MaxVelocity? hard to come up with a solution not knowing the exact situation. Hope your rest gives you clarity :slight_smile:

A good nap and hours later, i am still no where near finding a solution.
Would appricate any help :wink: