When I try to use an animation, it flickers for some reason. The project: PlayCanvas 3D HTML5 Game Engine
Please add some repro steps, your project has multiple scenes. What scene should we run to check your issue?
sorry debug 2
The transitions of your anim state graph have no conditions. Your animations therefore continuously switch to another animation.
I suggest to use the prepared method of the Basic Enemy AI example project. Add the anim component on the entity with the enemy script and apply the anim state graph that you can copy from the example project. Add all animations (also unused animations, for this you can use the idle animation as placeholder). Enable the component.
well now it’s just not playing anything
I checked your project and it seems to work correct now.
Apart from that, you need to adjust the sensor length and height. That are the white debug lines you can see. It has to be something like below.
it stays running when still. im sorry
nevermind i fixed it
It looks like that has to do with a change you have made to the enemy script. If I use the original example script in your project, it works as expected.
Also be aware that your animations don’t stay in place. The animation is moving forward without moving the entity. If you download an animation from Mixamo, you have to enable the ‘In Place’ option.