getRootMotionRotationAccumulator

    Retrieve the blended value of the rotation tracks with the rootMotionTrack as a Quaternion that can be used elsewhere.

    AnimationMixer.swift:922
    final func getRootMotionRotationAccumulator() -> Quaternion

    This is necessary to apply the root motion position correctly, taking rotation into account. See also getRootMotionPosition.

    Also, this is useful in cases where you want to respect the initial key values of the animation.

    For example, if an animation with only one key Quaternion(0, 0, 0, 1) is played in the previous frame and then an animation with only one key Quaternion(0, 0.707, 0, 0.707) is played in the next frame, the difference can be calculated as follows:

    However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases.

    Other members in extension

    Types

    Type members

    Instance members

    Show implementation details (1)

    Hide implementation details