Stride Forums Archive

Animation Enhancement

5 posts, 1804 views, 2016-08-01 to 2016-08-09

Leanid_Karpushenka (Leanid Karpushenka) 2016-08-01 #1

Is it possible to add one extra method to the AnimationComponent to play just one frame of animation?
So that I can use something like
_animation.Play(“LookUp_45Degrees”, 30);

Where 30 is the frame number in skeletal animation. Suggesting the pitch is about 30 degrees.

xen2 (Virgile) 2016-08-05 #2

AnimationComponent.Play returns you a PlayingAnimation object.
You can then set its frame using CurrentTime, and set TimeFactor to 0 so that it stay on that specific time/frame.

Hope that solves your problem!

Leanid_Karpushenka (Leanid Karpushenka) 2016-08-06 #3 in reply to #2

Thank you, this is helping. I’ll try!

Leanid_Karpushenka (Leanid Karpushenka) 2016-08-08 #4 in reply to #2

Look to the most right soldier. Plays one frame of animation. This is exactly what I wanted. : Thnx a lot. :slight_smile:

xen2 (Virgile) 2016-08-09 #5

Glad it helped!
Good luck with your project!