Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity 4.5: 2D Colliders + Rotation Change

Discussion in '2D' started by Yukichu, May 30, 2014.

  1. cparki3

    cparki3

    Joined:
    Jan 13, 2014
    Posts:
    41
    I've been following this thread very closely and honestly I'm still a bit confused. We have a 2-D character that flips. We have a polygon collider on his sword that flips just fine. The issue we are having right now is using a hinge chain made from 3-D physics attached to this same character. Looks amazing when running to the right, but as soon as we flip to the left everything breaks. Is there a method I can call on the hinge joints or rigid bodies that would keep this from happening? Let me know if you need more detail.
     
  2. Pyrian

    Pyrian

    Joined:
    Mar 27, 2014
    Posts:
    301
    Can you just not flip the 3D chain? Turn it around 180 degrees and re-attach it instead? Flipping doesn't really make a lot of sense in 3D.
     
  3. cparki3

    cparki3

    Joined:
    Jan 13, 2014
    Posts:
    41
    We are using Spine for our animations and basically one of our characters has a light on a strap that bounces around via physics chain. The images themselves are dependent on the chain. Basically this chain is added as children of the graphic part of the character. I initially did have the light separated and that solution you mentioned did work previously, but no dice this time around :/
     
  4. Pyrian

    Pyrian

    Joined:
    Mar 27, 2014
    Posts:
    301
    Have you tried double-flipping them? So, flip the parent, then flip the children to unflip them.

    The alternative, I'm afraid, is to re-build the chain each time you flip. Scale flips just do not play nice with joint anchors.
     
  5. GuardFromUA

    GuardFromUA

    Joined:
    Jan 11, 2017
    Posts:
    8
    It's been 2018 and again this problem is relevant.
     
    chronicseven likes this.
  6. jasondhoward

    jasondhoward

    Joined:
    Sep 27, 2020
    Posts:
    1
    In the 2020 1.4f version .. I still noticed this occurring with a 2D sprite, on a 3D @ 90 degree would keep the collider vertical. I switched the sprite to a cube and applied a sprite renderer and removed the mesh. It works, but may not be the best solution.