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
  3. Dismiss Notice

Using animation rigging on a non-root motion animator?

Discussion in 'Animation Rigging' started by pk1234dva, Aug 17, 2020.

  1. pk1234dva

    pk1234dva

    Joined:
    May 27, 2019
    Posts:
    84
    I've been fooling around with the basic animation rigging package in Unity 2019.3.1f1.

    In summary, on my basic "root" GO (here by root I just mean the most upper level game object), I have a character controller, a script that takes the inputs and moves the character controller, and some other components like animator, bone renderer, rig builder.

    I'm not using "apply root motion" on the animator component, and all my clips that are imported (using a basic mixamo character with some basic clips that are in-place animations) have the "bake into pose" in the import settings on every "root transform/rotation" settings.

    When I use a multi position constraint and I set the constraint object to say the hip bone, and the source as some other game object that is a child of the basic "root" GO, then even with 0 rig weight, no movement happens with the character controller. The animations play fine, and so does the rigging. For some reason, when I use "apply root motion", things work fine. But I'm not using root motion so I'm hesitant to keep it on...

    I don't really understand what the problem is. Regardless of what I'm doing with animation rigging etc, I'd assume that the character controller object should move fin. It's the highest parent in the hiearchy. But I guess that's not the case...

    Out of curiousity, I tried to see what would happen if I made yet another parent, that would only hold the character controller and the script that moves it (the animator etc. are all in a child), and with that setup, the whole object with the animator etc. just flies away at pretty large speeds.

    I can only guess that using a multi-position constraint creates some sort of weird loop that somehow keeps modifying the position of the original object that holds the animator component or something.
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi, you're likely using a humanoid character definition in your project.

    The character offset issue you're describing looks very similar to this:
    https://issuetracker.unity3d.com/is...x-constraint-moving-the-animators-parent-node
    This has been fixed in the current alpha release of Unity 2020.2.

    Otherwise, as for your other issues, it's difficult for me to say without knowing what is your character setup. I would try it out with a generic character to see if you have the same problems.

    Here is a response I gave not so long ago about using Animation Rigging with humanoid and some of the gotchas people can encounter:
    https://forum.unity.com/threads/using-humanoid-rigs-in-2020.923771/#post-6093156

    Finally, if you think something is not behaving as it should, please log us a bug!
     
    Last edited: Aug 17, 2020
    MRpiggins likes this.
  3. pk1234dva

    pk1234dva

    Joined:
    May 27, 2019
    Posts:
    84
    Thanks a ton, I didn't really expect an answer with the rambling mess of a post I did. Thank you, very kind of you to reply like this.