Search Unity

2D physics

Discussion in '2D' started by EPICKNIGHT, Sep 24, 2016.

  1. EPICKNIGHT

    EPICKNIGHT

    Joined:
    Sep 24, 2016
    Posts:
    4
    I'm not sure if this is the place for these kind of questions but the question being...

    I'm creating a 2d platformer whenever my character hits a side of a solid object he starts to flip around

    I don't know why , I don't how to stop it, I've tried to search it up but found nothing.



    Thanks very much
     
  2. PeaceLaced

    PeaceLaced

    Joined:
    Jun 2, 2015
    Posts:
    53
    What code are you using?
     
  3. Nuk1nat0r

    Nuk1nat0r

    Joined:
    Sep 25, 2016
    Posts:
    4
    when you look on the inspector, go to the rigidbody component, then click on the little arrow that says Constraints. From there, you can restrict rotation on the z axis, which will prevent your character from falling over.
     
    timtoo likes this.