Hey hey, I have another question regarding the new AnimComponent.
We are currently building something like a character creation. Our characters there can have vastly different bodytypes (imagine different number of arms, sphere or cube as torso, etc.), therefore I want to use the same AnimStateGraph but obviously can’t use the same idle animation track.
I tried to change the AnimTrack in code. When settinging the new body type, I want to remove the old AnimTrack and assign the new AnimTrack, something like this.
this.entity.anim.baseLayer.removeNodeAnimations("idle"); this.entity.anim.baseLayer.assignAnimation("idle", newIdleAnimation);
First of, I’m not 100% sure manually removing the anim track is necessary? Regardless, this results in the character standing there in T pose. Also when transitioning to another state, the character stays like this. So I tried resetting the anim component.
This doesn’t change anything though, the character stays in T pose and doesn’t do anything. So now I’m resetting the whole stateGraph.
This again results in the character staying in T pose, but now when I start a transition, the new animation starts playing, and then going back to idle plays the correct animation. Calling this function though triggers the complete setup of the AnimComponent, which seems like overkill?
Can someone explain this to me please? I just want to replace animations and then continue with the same AnimStateGraph, ideally without completely resetting it to stay in the same state that I’m currently in. Am I approaching this wrong, or am I missing something?