LocomotionAnimator
La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.
public sealed class LocomotionAnimator : IDisposableNamespace NodeWorld.Avatar.Locomotion.
Plays the locomotion clips on the local humanoid avatar from the velocity of its body: idle when still, walk or run blended by direction and speed, backward being the forward walk in reverse. The graph is evaluated by hand, right before the IK reads the pose. The moving clips share one phase, which advances with the distance covered: at a clip's own speed the planted foot stays still on the ground. Seated by the world, the sitting pose replaces them.
Constructors
LocomotionAnimator
public LocomotionAnimator(Animator animator, LocomotionClipSet clips)Plays clips on animator's avatar.
Properties
MovingWeight
public float MovingWeight { get; }How much of the pose walks or runs: 0 standing, 1 moving.
SittingWeight
public float SittingWeight { get; }How much of the pose sits: 0 standing or moving, 1 sitting.
Methods
Dispose
public void Dispose()Destroys the playable graph.
Evaluate
public void Evaluate(Vector3 localVelocity, bool grounded, bool sitting, float deltaTime)Poses the avatar for this frame. localVelocity: of the body, in the avatar's space, in m/s. sitting: the world seats the player. Called every frame: the IK resets the bones before, so the pose must be written each time.
EvaluateSitting
public void EvaluateSitting()Poses the avatar in the sitting pose alone, now, to measure it. The next Evaluate writes the blended pose again.
