Replacing onAnimCycleDone in new anim system

I make use of that in the now deprecated system, how do you do explicitly detect the end of a clip in the new system.

aside from that is it possible to only trigger animation blends\changes at specific frames in a clip
e.g. while playing a walk cycle if I wanted to delay a blend/change until a clip hits the “leg plant” frame of a footstep, is that possible in either system.

1 Like

https://hub.jmonkeyengine.org/t/solved-when-animcomposer-reaches-the-end-of-an-action

thank you @sgold
can anyone help with the second part i.e. detect if a frame is reached

@sgold is minie now the default physics of jme3.3x just following up from the posts in the linked thread want to make the 3.3 transition as smooth as possible

thanks

No, Minie is not the default physics for JMonkeyEngine 3.3. JME 3.3 comes with 2 physics libraries: jme3-bullet and jme3-jbullet.

Minie will, I hope, be the default physics for JME 4.

My approach to the second part would be:

  1. if the animation repeats, arrange for the AnimClip to start/end at the frame of interest
  2. if the animation doesn’t repeat, or there are multiple frames of interest in a single AnimClip, break it into shorter clips

If changing the AnimClip is inconvenient, an alternative approach would be to check AnimComposer.getTime() on every update.

again thanks I think option 2 might be better, starting clips at the “foot plant” might be problematic for flow reasons, breaking up the walk cycle to make the plants into clip ends makes sense

1 Like