- Home /
Question by
Glowball123 · Jun 04, 2020 at 05:08 AM ·
rotationquaternionlerp
how do i use Quaternion lerp on only the Y and Z axis
im trying to make it so that my car slowly rotates towards 0,0,0 except the X axis, in the video i almost have that except for some reason the x rotation starts to freeze.
here is my entire script: https://pastebin.com/t0xufY0c
but this is the line of code that mainly has to do with the issues:
transform.rotation = Quaternion.RotateTowards(transform.rotation, Quaternion.Euler(transform.eulerAngles.x, 0, 0), Time.deltaTime);
Comment