Download

Stop physics from affecting rotation

I’m creating a game with a planet so I have a sphere with gravity as a constant force acting towards its center. I have set the world gravity to 0. But since I’m adding forces, the engine physics is rotating it. How can I set the physics to not affect the body’s rotation?

In Unity, I can achieve this effect by using RigidBodyConstraints.freezeRotation.

No one? :frowning:

Unreal doesn’t have such an option. Perhaps you might be able to accomplish this by resetting the actor’s rotation on that axis on event tick. I haven’t tried that, though, so not sure if it’ll work as expected.