Description
The SetLookDirection
method of the SkinnedModelRenderer
class is used to set the look direction for a specific animation parameter. This method converts the given world space direction vector into a local vector relative to the entity's eye position and then passes it to the animation system using SetAnimVector
.
Usage
To use the SetLookDirection
method, you need to provide the name of the animation parameter and the direction vector in world space. This method will handle the conversion to local space and update the animation system accordingly.
Example
// Example usage of SetLookDirection
SkinnedModelRenderer renderer = new SkinnedModelRenderer();
string parameterName = "lookDirection";
Vector3 worldDirection = new Vector3(1, 0, 0); // Example direction
renderer.SetLookDirection(parameterName, worldDirection);