Search Unity

Problem with Rigidbody2D and Collider2D when animation from spritesheets attached.

Discussion in 'Animation' started by Mandar, Mar 17, 2014.

  1. Mandar

    Mandar

    Joined:
    Feb 12, 2014
    Posts:
    10
    Hi, I was trying out different ways to animate characters for my 2D game in Unity 4.3.4 and tried out spritesheet animation (by slicing the sprite using grid option in sprite editor. Followed instructions on - http://michaelcummings.net/mathoms/creating-2d-animated-sprites-using-unity-4.3#.Uyazts9WHIU).

    However, When I create animations using this method, the animations play well on the gameobject (using animator component attached to that gameobject) but Rigidbody2D and BoxCollider2D doesn't seem to work after Animator is attached. The character is neither affected by gravity nor does it collide with other gameobjects. Please help.
     
  2. SpiriTx

    SpiriTx

    Graphics QA Unity Technologies

    Joined:
    Apr 12, 2012
    Posts:
    252
    Your animation probably is changing position of the object.

    Try disabling "Apply root motion" checkbox in the animator.