Table of Contents

Interface IAnimator

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public interface IAnimator
Extension Methods

Properties

ActiveAnimationCount

Amount of currently active animations

int ActiveAnimationCount { get; }

Property Value

int

Animations

Holds data over all animations. This list always contains all animations of the creature. You have to check yourself which of them are active

RunningAnimation[] Animations { get; }

Property Value

RunningAnimation[]

CalculateMatrices

Whether or not to calculate the animation matrices, required for GetAttachmentPointPose() to deliver correct values. Default on on the client, server side only on when the creature is dead

bool CalculateMatrices { get; set; }

Property Value

bool

Matrices

The 30 pose transformation matrices that go to the shader

float[] Matrices { get; }

Property Value

float[]

MaxJointId

int MaxJointId { get; }

Property Value

int

Methods

DumpCurrentState()

string DumpCurrentState()

Returns

string

GetAnimationState(string)

RunningAnimation GetAnimationState(string code)

Parameters

code string

Returns

RunningAnimation

GetAttachmentPointPose(string)

Gets the attachment point pose.

AttachmentPointAndPose GetAttachmentPointPose(string code)

Parameters

code string

Returns

AttachmentPointAndPose

GetPosebyName(string, StringComparison)

ElementPose GetPosebyName(string name, StringComparison stringComparison = StringComparison.InvariantCultureIgnoreCase)

Parameters

name string
stringComparison StringComparison

Returns

ElementPose

OnFrame(Dictionary<string, AnimationMetaData>, float)

The event fired on each frame.

void OnFrame(Dictionary<string, AnimationMetaData> activeAnimationsByAnimCode, float dt)

Parameters

activeAnimationsByAnimCode Dictionary<string, AnimationMetaData>
dt float