Exemplo n.º 1
0
        void OnAnimatorMoveEvent(Vector3 deltaPosition, Quaternion deltaRotation)
        {
            if (!UseRootMotion)
            {
                return;
            }


            if (CharacterActor.IsKinematic)
            {
                CharacterActor.Position += deltaPosition;
                CharacterActor.Rotation *= deltaRotation;
            }
            else
            {
                CharacterActor.Move(CharacterActor.Position + deltaPosition);
                CharacterActor.Rotate(CharacterActor.Rotation * deltaRotation);
            }
        }