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 |
---|---|---|
Affine |
rootMotion | Root motion to steer, represents a root delta transform for a frame |
Affine |
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
|
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
|
float | endSpeed | Root speed (m/s) at which steering will be fully effective |
Returns
Type | Description |
---|---|
Affine |