C4 Engine
C4 Engine API Documentation

Model::SetRootAnimator

Defined in:  C4Models.h
Sets the root animator attached to a model.
Prototype

void SetRootAnimator(Animator *animator);

Parameters
animator The new root animator.
Description
The SetRootAnimator function attaches an animator tree to a model, where the root of the animator tree is specified by the animator parameter. When the SetRootAnimator function is called, the Animator::PreprocessAnimator function is called for each animator in the tree through a post-order traversal.

The animator parameter can be nullptr, in which case any existing animator tree is detached from the model node, and the model subsequently has no animators attached to it.

The animator tree is not owned by the model node and is not deleted when the model is deleted.
See Also

Model::GetRootAnimator

Model::GetAnimatedTransformNodeCount

Model::AnimateModel

Animator