Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug Multi-Aim Constraint Ignores Angle Limits in Play Mode Only

Discussion in 'Animation' started by shotgunbruin, Apr 2, 2023.

  1. shotgunbruin

    shotgunbruin

    Joined:
    Mar 26, 2020
    Posts:
    1
    I have set up a multi-aim constraint for a head look, but it ignores the min and max limits and constrained axes in play mode.

    The rig consists of a multi-aim constraint that constrains a box effector to point to a lookAt target. The box effector then has an override transform that affects the head bone. The aim constraint is limited to X and Y with angles -40 and 40. In animation preview mode, this works fine, the head moves to look at the target exactly as I wish, respecting the angle limits and axis restrictions.

    But in play mode, these angle limits are ignored, and the effector rotates around all axes and with no limits, but it still correctly targets the lookAt transform. Changing these values during runtime has absolutely no effect no matter how they are changed; the head follows and rotates 360 degrees.

    There are no other scripts on this Y Bot character, just the rig builder and an animator, and yet his head is twisted completely around despite the limits. This occurs on other character and occurs even if I destroy and rebuild the rig and constraints.

    Is this a bug, or have I just completely misunderstood the entire purpose of the min max limits and the constraint as a whole?

    Any help on this is appreciated, this has proven to be extremely frustrating.

    MultiAimConstraintError.jpg
     
  2. Lifee00

    Lifee00

    Joined:
    Apr 13, 2021
    Posts:
    88
    I've been working with those constraints for a while, any changes will not take effect in game, you either have to restart the game scene OR you have to disable the character and enable it again then you can see the changes. Kinda annoying tbh but only solution so far. At least you know if they work or not after doing this.