docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SteerRootMotion

    SteerRootMotion(AffineTransform, AffineTransform, float, float, float, float, float)

    Returns the interpolated transform between the current and desired root motion, taking into account individual translation and rotation weights

    Declaration
    public static AffineTransform SteerRootMotion(AffineTransform rootMotion, AffineTransform desiredRootMotion, float deltaTime, float translationWeight, float rotationWeight, float startSpeed = 0, float endSpeed = 0.15)
    Parameters
    Type Name Description
    AffineTransform rootMotion

    Root motion to steer, represents a root delta transform for a frame

    AffineTransform desiredRootMotion

    Desired root motion toward which we steer the current root motion

    float deltaTime

    Delta time associated to the root motion. That means root velocity for the frame is

    rootMotion.t / deltaTime
    float translationWeight

    Interpolation weight between the root delta position at 0, and the desired delta position at 1

    float rotationWeight

    Interpolation weight between the root delta rotation at 0, and the desired delta rotation at 1

    float startSpeed

    Root speed (m/s) at which steering will start to be effective, steering weight will then increase linearly as root speed increases toward

    endSpeed
    float endSpeed

    Root speed (m/s) at which steering will be fully effective

    Returns
    Type Description
    AffineTransform
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)