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

Rigidbody2D + Interpolation = Restricted GameObject Rotation

Discussion in '2D' started by Yukichu, Feb 13, 2014.

  1. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    I have a GameObject with a Rigidbody2D and Collider2D and other things (script objects, 2DToolKit Sprite, etc.)

    If I turn interpolation ON for the Rigidbody2D, the X/Y rotation absolutely will not rotate while running. It always resets to 0. Whether I try to change the values in the editor while in the game is running, or via script... it absolutely will not change.

    Interpolation turned OFF, and it works fine.

    I've been told by a few people that a Rigidbody2D isn't designed to rotate on the X/Y axis. I understand this. When I rotate a GameObject with interpolation OFF, I can see the collider2D is not rotating on the X/Y axis. It just sits there. I would expect the Rigidbody2D to behave the same.

    So... I basically need to know:
    1. Am I doing something 'wrong' in rotating the GameObject of the Rigidbody2D?
    2. Why is Interpolation restricted while ON, but not restrict while OFF?
    3. Should I go back to 3D physics for fear of future Unity updates breaking this non-restriction while interpolation is off?
    4. Just occurred to me I could have a parent object with Rigidbody2D, and the rotating Sprite to be a child object, and rotate the child. I will investigate this further.

    Anyhow... annoying. Any insight into this would be very much appreciated.
     
  2. tydus1632

    tydus1632

    Joined:
    Oct 9, 2013
    Posts:
    1
    I'm in the same situation, any solution?

    Thank you very much in advance.
     
  3. blackmodjo

    blackmodjo

    Joined:
    May 6, 2014
    Posts:
    14
    Well it seems like a bug but i have a workaround...just create a subobject inside your object that has the rigid body and assign to it the mesh renderer and mesh filter with the rotated mesh
     
  4. JasonB

    JasonB

    Joined:
    Dec 29, 2010
    Posts:
    95
    This bug still exists and is still causing problems.
     
  5. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Did you submit a bug report?