Hello. There is a platform with a rigidbody and a boxcollider hanging on it. A player stands on the platform, the same thing hangs on it, and gravity is used. The player turns by the following method:

transform.rotation = Quaternion.RotateTowards(transform.rotation,angle,Time.deltaTime*speedRotation); 

when transform.rotation = angle, the object begins to "twitch", that is, rotate along Z in different directions somewhere by 1 degree. When it rises, or I turn off gravity, the jerking stops. Tried to add nat. material with friction = 0 does not help. How to be?

    1 answer 1

    RotateTowards in this case turns the object and friction all the same occurs.

    I suspect that this effect will not be if you use a smooth change simple Rotate many times in a row with a slight shift.

    For this, it is very convenient to use the LeanTween library.

    It will be something like LeanTween.RotateByX (gameObject, -100, 1f);

    it is also possible to use some physical damping of the rotation using the .SetEase (someEase) method at the end of the above shown method;