/// <summary> /// Allows the motion to modify the velocity before it is applied. /// </summary> /// <param name="rDeltaTime">Time since the last frame (or fixed update call)</param> /// <param name="rUpdateIndex">Index of the update to help manage dynamic/fixed updates. [0: Invalid update, >=1: Valid update]</param> /// <param name="rMovement">Amount of movement caused by root motion this frame</param> /// <param name="rRotation">Amount of rotation caused by root motion this frame</param> /// <returns></returns> public void UpdateRootMotion(float rDeltaTime, int rUpdateIndex, ref Vector3 rMovement, ref Quaternion rRotation) { // Check the motions to determine if we should remove the root motion. // If even one active motion wants it removed, remove it. if (mActiveMotion != null) { mActiveMotion.UpdateRootMotion(rDeltaTime, rUpdateIndex, ref rMovement, ref rRotation); } }