Component:Animator

From Resonite Wiki
Component image 
Animator component as seen in the Scene Inspector

Animator is a component that's used to play Animation and drive a list of fields using the contained animation data. The order and type of said fields is determined by the Animation in the Clip field, and the value sampled from the Animation for any field (Fields) is determined by the Animation's sampled value at the position the _playback is currently at. Sampling is determined by the type of Animation Clip is. You should be able to drive field by assigning ValueField's Value onto Fields.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
_playback direct SyncPlayback Is populated by the length and properties of Clip and is used to determine what point at which to sample the Clip.
Clip Animation An Animation used to determine the list of Fields on this component and their value/ref types.
Fields list of DriveRef`1<IField> the list of values stored in this animation. Each field and it's type/animation data is determined by track index order.

Special Functions

Triggers
Method Name Method type and Arguments. Description
SetupFieldsByName() null Sets up all the target values based on the property field of each track in the animation Clip file.

Behavior

This component doesn't require every item of Fields to be filled out to still function. This behavior can be taken advantage of.

In the case of Ghostly's Mantis Blade, the arm which the blade is attached to comes with an animation to animate the blade. However, the animation being imported onto a full VRIK rig will prevent the VRIK from being generated. Though if the model is imported again without the animation, the rig will not be animated but it will have VRIK. If the Animator component is moved to the root of the VRIK avatar and the user hits set up slots, then the animator will animate the mantis blade on the arm once again, even though most of the fields are empty.

Examples

This is generated by the GLTF and FBX importers when a file with animation data is imported. Any extra animations that don't fit into the animator (EX: NLA tracks from Blender3D) when the animation is imported is put as a component attached to the AssetSlot for the file that is generated by the importer while importing.

See Also