Skip to content

Root motion position might not be set correctly #123

@albertomelladoc

Description

@albertomelladoc

Hi!

I have found another possible issue. This one is related to rootmotion. In the line 451 of AnimationInstancingMgr. It won't be an issue for everyone, but since the position of the animationInstance is calculated with a localPosition setting it with the methodSetPositionAndRotation might not deliver the expected results, moving the character even with idle animations. Using SetLocalPositionAndRotation instead would be best.

Like this:

#if UNITY_5_6_OR_NEWER
                instance.worldTransform.SetLocalPositionAndRotation(localPosition, localQuaternion);
#else
                instance.worldTransform.localPosition = localPosition;
                instance.worldTransform.localRotation = localQuaternion;
#endif

This fixed the issue for me. Hope it helps someone!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions