Run animation from keyframe x to keyframe y

Run animation from keyframe x to keyframe y

lars_jacobsen_ScandiSim
Advocate Advocate
18 Views
1 Reply
Message 1 of 2

Run animation from keyframe x to keyframe y

lars_jacobsen_ScandiSim
Advocate
Advocate

[ FlexSim 23.2.1 ]

Is it possible, in a simple way, to run an animation from keyframe X to keyframe Y? I.e. from keyframe 2 to keyframe3.

Animation.fsm

0 Likes
Accepted solutions (1)
19 Views
1 Reply
Reply (1)
Message 2 of 2

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

To sklp to the next keyframe you could try stopping the animation after a breathe and then use Animation.resume(RESUME_AT_NEXT_KEYFRAME). Then if you know the time between the keyframes* you can stop it finally at the third keyframe. Using that technique it should be quite simple to create a subflow to run based on passed parameters - startkeyframe and numkeyframes.

Example attached.

animation_keyframe_2to3.fsm


* You can find the duration of the keyframes from the difference in keyframe node values (from the tree). If you've specified a different duration when starting the animation then you'll need to calculate the effective keyframe intervals on a pro-rata basis assuming they are scaled linearly.

0 Likes