Problems with the new animation graph

It’s been a little while since I used Playcanvas so I’m trying out the anim state graph for the first time, and having problems figuring out some really basic stuff.

For my simple test I have a little model with two buttons. I want the button animations to be pushable/clickable separately. For now I’m just trying to get one button to be able to fire from an idle state.

I’ve been looking at the Anim Blending tutorial to try to figure this out. For some reason the setup for triggering the second animation is just not working, and I can’t figure out why. It seems to be the same setup as in the tutorial, but it just doesn’t fire.

If I set the boolean parameter which is supposed to fire the second animation to default to true, then it does work. So it seems like the boolean is not getting set properly, but then if I check whether that is the case in the console, it does seem to be getting set to true. Totally confused…

Here is the project: PlayCanvas | HTML5 Game Engine

Would really appreciate any help getting this working!

I’ve had a look at this and the issue is that ‘idle’ animation has no animation on the buttons so transitioning to that animation does nothing because there are no keyframes on the button bones.

Add a single keyframe as a ‘pose’ for the idle and it should work.

Here’s a fork with a few tweaks and using Button02Down animation as ‘idle’ to test:

It still has problems because it doesn’t have keyframes for the other button to be in the ‘up’ state so you end up with both buttons down:

TLDR, the animation system will only animate bones that have keyframes in the animation. There’s no initial ‘pose’ that’s being used to for the ‘default’ state

Ah, OK, thanks so much for this.
I think this system isn’t really designed for what I’m trying to do, I think there’s probably a better/simpler way.

What are you trying to do? There are several different ways to use the system that could help but they all rely on the animations themselves animating the ‘right’ bones