Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Rotating just X and Z axis changes Y angle?

Discussion in 'Physics' started by fuzymarshmello, Feb 22, 2015.

  1. fuzymarshmello

    fuzymarshmello

    Joined:
    Feb 22, 2015
    Posts:
    17
    Basically this is my code

    rigidbody.AddRelativeTorque (new Vector3 (forwardAndBack, 0, -leftAndRight)*5f);

    It works great, but it changes the Y rotation too. How can I stop that from happening?