Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Multi-Rotation constraint weird rotations on Play

Discussion in 'Animation Previews' started by LabOSM, Nov 2, 2020.

  1. LabOSM

    LabOSM

    Joined:
    Sep 5, 2019
    Posts:
    18
    I have a character (rotated by 90°, this gives problems) with a cube in it, which I use to rotate the head (this is to simulate a camera rotation).
    upload_2020-11-2_10-47-27.png

    upload_2020-11-2_10-48-13.png


    The cube and the head are already rotated in the same direction
    upload_2020-11-2_10-48-55.png

    But when I press start the cube gets rotated by 90° (this happens at any rotation of the character, it's always 90°), and so does the head
    upload_2020-11-2_10-49-51.png

    If I move the cube out of the character this does not happen.
     
    Last edited: Nov 2, 2020
  2. LabOSM

    LabOSM

    Joined:
    Sep 5, 2019
    Posts:
    18
    If I move the cube out of the character (in the scene root) and set its Y rotation under 90° it stays like that on play, if I set anything above 90° it gets clamped to 90°...
     
  3. LabOSM

    LabOSM

    Joined:
    Sep 5, 2019
    Posts:
    18
    In another similar setup I have the CameraPivot instead of the Cube and a Cube instead of the Head:
    upload_2020-11-2_11-22-13.png
    the CameraPivot and the Cube both starts at (0, 0, 0) localRotation, while the Player is rotated to 100° on the Y
    upload_2020-11-2_11-22-59.png

    upload_2020-11-2_11-23-5.png

    upload_2020-11-2_11-23-15.png

    As soon as I hit play the cube snaps to 100° while CameraPivot stays at 0°
    upload_2020-11-2_11-24-6.png

    Checking or unchecking Maintain Rotation Offset does nothing...

    If I rotate the Player to (0, 0, 0) everything works as expected

    It almost seems like it is setting the localRotation of the constrained object based on the global rotation of the source
     
    Last edited: Nov 2, 2020