Pretty much what the title says, I was using this bit of code:
void Update () {
float leftStickx = Input.GetAxis("Horizontal");
float leftSticky = Input.GetAxis("Vertical");
transform.Translate(leftStickx * Time.deltaTime * speed, leftSticky * Time.deltaTime * speed, 0, Space.World);
float rightStickx = Input.GetAxis("Right_Horizontal");
float rightSticky = Input.GetAxis("Right_Vertical");
float angle = Mathf.Atan2(rightStickx, rightSticky) * Mathf.Rad2Deg;
if (rightStickx != sensitivity || rightSticky != sensitivity)
{
transform.rotation = Quaternion.EulerAngles(0.0f, 0.0f, angle);
// transform.rotation = Quaternion.Angle()
}
}
from a tutorial, but #1 EulerAngles seem to be deprecated, which is okay, but it still rotated my character, even if the sensitivity was crazy. So, how do I use the Quaternion.Angle with an XBOX Right Thumbstick so I can rotate my character and do it smoothly.
Thanks a lot for any help in this matter!