animationGroup.syncAllAnimationsWith seems to never work?

I have tried to use animationGroup.syncAllAnimationsWith() several times and for some reason can not get it to accept anything that I pass it.

the docs says pass a Animatable but I have done that an every time I get something about a frame error.

Does anyone have an example where an animation group is synced to another one?

Yes :slight_smile:

Just search there: Playground search page | Babylon.js Documentation

First result: Additive animation blending | Babylon.js Playground

This helps with some of my stuff but does not show how to sync a run and a walk animation into the same stride.

This will help with the crouching though!

I tried to record a video to demonstrate what I was talking about, but this time it did not really do it. This did bring up other things I wanted to ask about though.

One, with head targeting some of the animations cause the chest to move quite substantially which then makes the rotation corrections applied on the lookAt method to no longer be valid. Is there a way to negate those values programmatically so I dont have to make adjustments per animation?

Two, what is the best solution for a jump animation, currently I only have the one and it seems to only work for a idle jump. I guess the correct solution would be to have one for forward, back, left, right, and even maybe another set for running jumps?

Last, back to the initial question of this thread. Though this video does not demonstrate it really well, what would be the best way to prevent the character from “skipping” or rather stop it from having the run and walk animations legs from being in opposite phase? I thought it would be a syncAllAnimations thing, but its looking like not.

syncAllAnimations was meant for additive animations:

Advanced Animation Methods | Babylon.js Documentation

I wonder if this demo could help: prova | Babylon.js Playground (babylonjs-playground.com)

1 Like