Move Rotation (apply always to the same axis)

Hello,
I’ve the problem that I want to move my Cube (rigidbody), turn it and rotate it.
For the movement I’ve used MovePosition for my spinning AddTorque.
Now I’ve always the problem with the MoveRotation… I’ve really ugly alternatives or one
really ugly Alternative (but it works…):
cube.transform.Rotate(Vector3.up * amount * Time.deltaTime, Space.World);
which is used like this: “transform.rotation, however the rotation will only be applied to the transform at the end of the physics step” (Unity - Scripting API: Rigidbody.rotation)

I’ve the problem that I can only apply the rotation once. If the cube is on the left side it won’t filp again because
the moveRotation uses a different axis.

Quaternion deltraRot = Quaternion.Euler(Vector3.up * 100 * Time.deltaTime);
cube.rigidbody.MoveRotation(cube.rigidbody.rotation * deltraRot);

I hope you can help me guys :wink:
Greeting
Leo

First, are you certain you need to be using a RigidBody for this object? Life is always simpler without physics.

If you do, then it sounds like you need to make your rotation relative to the cube’s current orientation, rather than to the global world axes. So, try simply changing Vector3.up in your code to transform.up.

Thanks for your reply. I want to write something like a game of dice with some features. That’s why I need (unfortunately) rigidbodys :eyes: I’ve tried transform.up in the past and I tried it again. That problem still exists. With transform.up it works but when the cube is on a different side it doesn’t work any more. One solution is to remove/deactivate rigidbody during the rotation progress and then add it again… But if there’s another hint/solution I will try it :wink: