Hi, I´m have connected the animations from a character model that I found in the asset store. All works fine with the transitions in the state machine of the animator, it has four clips : idle, walk, run and jump.
Now, I just want to animate a cube that go from one point to another. That animation looks as I want in the Unity Editor, it only has two states :
1 - Whe is steady
2 - When it moves side to side.
It has only one transition using a boolean activate
.
Then I have attached a simple script to the object that has the animator:
export class SimpleAnimatorController extends Behaviour{
update(): void {
if(this.context.input.isKeyDown("z")){
console.log("Activate Animation");
console.log(this.gameObject.getComponent(Animator));//This looks fine in the web console
this.gameObject.getComponent(Animator)?.setBool("activate", true);
}
}
}
After done this, The transition is not working and I don´t know why if my character´s animations works just fine.
I have tried use exported animations from blender but I doesn´t work yet.
by user 632418299711324161