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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Flipping Joints issue.

Discussion in '2D' started by Keith90, Jul 23, 2015.

  1. Keith90

    Keith90

    Joined:
    Sep 27, 2013
    Posts:
    116
    Hello,

    Currently I have a player with hingejoints being used to connect each limb to each other. When I flip the character, the joints go all out of wack and don't work.

    Does anyone know if this is a bug or does anyone have any fixes for this?

    I greatly appreciate anyone's time and information.

    Thanks. :)
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Little more info might help find a solution.
    Flip means from left to right? Front flip invert? Change direction?
    Is the character 2 or 3D?
     
  3. Keith90

    Keith90

    Joined:
    Sep 27, 2013
    Posts:
    116
    When I flip the character from right to left by changing the localscale X. The character is 2D.

    The joints only work facing one way but don't work facing the other. The anchors become far off from where they should be and it distorts it all.
     
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    By rotating the character on the Y axis instead of using x local scale does the hinge still not work?

    If that doesn't work - you may want to check this recent post out.
     
  5. Keith90

    Keith90

    Joined:
    Sep 27, 2013
    Posts:
    116
    I've already tried rotating on the Y axis, it doesn't work. I took gameobjects, put a rigidbody2D, a boxcollider2D and a hingejoint2D, that's it.

    I connect it together using the hingejoint2D. It works fine, but when I either change either x local scale or Y axis, the effect still happens.

    The left one is normal. The middle one is rotated on Y-Axis. The right one is changed by localscale.x.

     
  6. Keith90

    Keith90

    Joined:
    Sep 27, 2013
    Posts:
    116
    Anyone?
     
  7. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    434
    I would guess take a look at the pivot of individual parts.

    Or can you share your sample project for us to take a look?