Skip to content

How do you add a procedural animation on a specific bone ? #1027

Answered by ykafia
ykafia asked this question in Q&A
Discussion options

You must be logged in to vote

Self answering

Assuming you've got a function creating a curve for a rotation

var clip = new AnimationClip { Duration = TimeSpan.FromSeconds(1) };
clip.AddCurve("[ModelComponent.Key].Skeleton.NodeTransformations[1].Transform.Rotation", CreateRotationCurve());

When you add a curve, the string should specify [ModelComponent.Key] to access the model component. From there, you have to reach the skeleton's NodeTransformations

Replies: 1 comment

Comment options

ykafia
Mar 1, 2021
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by ykafia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant