ParelVRDocs
Player site

Scripting / Reference

Animation

Types in the ParelVR.Volt.Animation namespace.

VoltAnimator#

ParelVR.Volt.Animation.VoltAnimator reference extends VoltComponent

An animator on a world object.

VoltAnimator properties#

bool Enabled { get; set; }

Whether the animator runs.

float Speed { get; set; }

Playback speed, 1 is normal.

VoltAnimator methods#

void CrossFade(string stateName, float seconds, int layer)

Blends to a state on a layer over a number of seconds.

bool GetBool(string name)

Reads a bool parameter.

float GetFloat(string name)

Reads a float parameter.

int GetInteger(string name)

Reads an int parameter.

float GetLayerWeight(int layer)

Reads how much a layer contributes.

VoltAnimatorState GetStateInfo(int layer)

What a layer is playing right now.

bool IsInTransition(int layer)

True while a layer is blending between two states.

void Play(string stateName, int layer)

Jumps to a state on a layer.

void ResetTrigger(string name)

Clears a trigger parameter that has not been used yet.

void SetBool(string name, bool value)

Sets a bool parameter.

void SetFloat(string name, float value)

Sets a float parameter.

void SetInteger(string name, int value)

Sets an int parameter.

void SetLayerWeight(int layer, float weight)

Sets how much a layer contributes, 0 to 1.

void SetTrigger(string name)

Fires a trigger parameter.

VoltAnimatorState#

ParelVR.Volt.Animation.VoltAnimatorState class

What an animator layer is doing.

VoltAnimatorState properties#

float Length { get; }

Length of the state in seconds.

bool Loop { get; }

True when the state loops.

float NormalizedTime { get; }

How far the state has played: the whole part counts loops, the fraction is the position in the clip.

VoltAnimatorState methods#

bool IsName(string name)

True when the state has the given name.

bool IsTag(string tag)

True when the state has the given tag.