Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Animation rigging - Multi-Aim constraint jitter

Discussion in 'Animation Rigging' started by FakeBocha, Apr 10, 2020.

  1. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    I'm using the Multi-Aim constraint to aim my weapon but for some reason, it jitters in a weird way.
    I use the Multi-Aim constraint to aim at the target and then I made a child object who controls the right-hand IK.

    https://imgur.com/hRxEpJ9

    this is my rig:
    https://imgur.com/QkXybvY


    I'm updating the player rotation in FixedUpdate and also the aim target at fixed update.

    Edit:
    If I change the rotation change method to be in Update - it fixes it, but it's not ideal for me... Is there any way around this?
     
    Last edited: Apr 10, 2020
  2. sinjinn

    sinjinn

    Joined:
    Mar 31, 2019
    Posts:
    149
    Hey, I probably wont be able to help as I'm just trying to learn AR myself, but just curious, did you make your own rig?
     
  3. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    Yes, why?
     
  4. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    By default, the animation system evaluates with the game logic after the `Update` loop. To change this, you can change the Update Mode to `Animate Physics` on the Animator. This will evaluate the animation in fixed delta time and should allow you to sync with your script.
     
    Shamantiks likes this.
  5. FakeBocha

    FakeBocha

    Joined:
    Aug 8, 2017
    Posts:
    23
    Tried that - it didn't affect the jittering.

    I'll be more precise - I'm using aim constraint on the parent of the Right-hand target to make the hand aim at my target, but for some reason - it jitters. (I've changed it back to regular Update but it still does that)
     
  6. Maviekran

    Maviekran

    Joined:
    Dec 31, 2018
    Posts:
    2
    I have this problem. I need help too.
     
  7. planet22

    planet22

    Joined:
    Jul 30, 2019
    Posts:
    1
    Multi-aim worked fine until I turned off the x constrained axes, then the jitter started. I had to turn off the x axis constraint because the weapon would slowly rotate on the x (aim axis is -x) as I aimed the weapon that I moved around. Even with x axes disabled at random times -180 degrees gets put into the transform and rotates the weapon.
     
    Last edited: Jul 28, 2020
    kkl888 likes this.
  8. kkl888

    kkl888

    Joined:
    Dec 6, 2014
    Posts:
    55
    I have the same issue too! Turning off x constrained axes will cause flickering occasionally.

    Unity 2020.2.2f & Animation Rigging 1.0.3
     
  9. TonyV125

    TonyV125

    Joined:
    Oct 7, 2016
    Posts:
    3
    Take a look at this video tutorial that shows a solution and even explains what causes the jitter...


    The link should take you right to the part where the creator of the series explains how you can change when the Cinemachine camera updates versus when the animator updates. The series is great for setting up a 3rd person controller using Cinemachine and Animation Rigging.

    Unfortunately, it means changing the Update Mode on the animator to "Normal" which seems to soften the effect of root motion. I'm thinking about switching the update mode as needed (aiming vs not), but when I flip between "Normal" and "Animate Physics" from the inspector while testing, my IK points get weird. I'm hoping he comes up with more solutions later in the series. This is as far as I have gotten ATM.
     
  10. SomeHappyBalls

    SomeHappyBalls

    Joined:
    Sep 5, 2021
    Posts:
    1
    I have the exact same problem I have searched all over the internet...
     
  11. Shamantiks

    Shamantiks

    Joined:
    Mar 11, 2022
    Posts:
    11
    Animate Physics solved my jitter bug, thanks partner!