Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

My player is rotating when it falls

Discussion in '2D' started by roan05112008, Sep 6, 2019.

  1. roan05112008

    roan05112008

    Joined:
    Sep 5, 2019
    Posts:
    17
    Hello

    My player is rotating when it falls. I tried with Quaternion localRotation.z, but it didn't work.
    How do I do this?
     
  2. bloodwolftico

    bloodwolftico

    Joined:
    Nov 13, 2017
    Posts:
    100
    If you want your player to STOP rotating when it falls, just go to Rigidbody > Constraints and make sure the Z axis is checked.
     
  3. roan05112008

    roan05112008

    Joined:
    Sep 5, 2019
    Posts:
    17
    Thank You! It helped me a lot!
    Have a nice day! :)
     
    bloodwolftico likes this.
  4. bloodwolftico

    bloodwolftico

    Joined:
    Nov 13, 2017
    Posts:
    100
    Happy to help! And thanks, have a nice day as well :)