Download

Limit the velocity of a Physix controlled actor?

Hi,
In my Pinball game, i am currently limiting the linear velocity of my ball(For stability reasons).

I use GetPhysicLinearVelocity in OnTick and check each vector value, if it’s above or below a given value, i set it to the given max/min if required. Then i use SetPhysicLinearVelocity to apply the changes.

This works fine sofar, just wondering if there is a function/method which let’s me do this directly. I somehow feel that my solution is odd.

Greetings
Memnarch

For more control & stability I would try adding some linear/angular damping instead although that might not be the best for a pinball game.
I’m not aware of another method of clamping the velocity… I’m sure there was a limit max physics velocity parameter in UDK but I can’t find something like that in UE4.

Thanks for your answer.
Damping is not a solution. While higher damping reduces the possibility of aquireing a given speed, it is NOT impossible. A limit makes it impossible.

However, the devs said, thei’ll give us control over angular velocity. WIth a suitable friction and a suitable max angular velocity, it might do the job(however, i might keep my routines to make shure, as the ball might jump and is not affected by angular damping midair)