Weighted Animation None Looping Synced to Value

I have been struggling trying to get a crouch and jump animation to blend correctly with an idle, walk and run animation series.

I have tried to do syncAllAnimationsWith(value) and I always get an error about how the animation has no frames. I have also tried to manually set the animations frame to a value that I control and was not able to get that to work either.

1 Like

You will need a controller for right now
Here is a PG demonstrating it:
https://playground.babylonjs.com/#J0XFM0

If you hit down on the left stick you will see the animation play and then “snap” back to its beginning after its done playing. If I can make it hold at the end frame, that would be one solution.

I would ideally like to manually animate the frame location though to a value between 0-1 of the “crouch” range of the input.

It’s looking like if you get rid of the loop it also deletes the animatables afterwards as well which is how you can set the frames manually.

So if I just let it loop, but control its frame position when its weighted I should be all set?
https://playground.babylonjs.com/#J0XFM0#3

Does not look like if I set the frame manually does it continue to blend.

Great character! Can’t see the problem, looks cool! : )

@aFalcon the squat should not stop the forward walking movement animations if there is still some of that weight, basically.

So I am thinking the best solution is to get a animation sequence with the player fully squatted and animated bobbing around instead of the animation of him squatting, and then blend that.

The way I did those things (for a simple mesh) was to make completely separate animations (in blender). Then call the separate beginAnimation when needed.

The only reason I had room for the extra animations, though, was because I pulled out all extras like morph manager, etc.

Maybe you can create a new animation: squatWalk, and transition into that?