How can I do the Pathfinding correct animation?

How can I make enemies with Pathfinding behavior show the correct animation according to their angle of rotation or displacement in 8 directions?
I tried these options but they don’t work.

even added behavior 8 movements and it doesn’t work.
Of course I am grateful for all help.
Sorry for my English XD

Take a look on Isometric example, the character Minda use Top-Down Movement (4 or 8 directions)

Unfortunately The problem with the Minda example is that MINDA obeys the actions of the mouse or keyboard. In my case if the enemy applied a default control effectively changes the animation …

But if I only apply Pathfinding behavior to the enemy, the enemy persecutes me but does not change his animation even with events.

I don’t know if there is another alternative to Pathfinding behavior for the enemy to chase me and change their animations according to their angle.

Finally after much trial and error.:alegría: I achieved a solution to the change of animation according to the angle of rotation of an enemy with Pathfinding behavior. Here my solution. If you have any other way please tell me.

1 Like

Hello Hoar, how are you?
I’m having the same trouble. How did you solve it? did you find another easiest way?:grimacing:

I put here 2 more photos that worked for me. Even so, I think there can be multiple solutions.

1 Like

Thanks for your reply, maybe i will try to do like this. I tried but i couldnt do it, maybe im doing something wrong. I will do it again later and i will tell you if it goes for me: :grinning:

http://www.mediafire.com/file/rbxscxghxq5u4ev/My_project21.rar/file

Here my events and I hope it helps you. If you want you can also apply animation and diagonal movements to the enemy.

1 Like

Thanks a lot for this example!!! it will helps me. I will try to do with diagonals. Thanks for your reply and your time!!:grinning::grinning:

I found another solution that i find simpler, since all that math stuff makes no sense to me. I have a hidden object following my moving character. The hidden object has rotation enabled. That allows me to get an angle while the object is moving without having my visible object rotating. Instead my visible object gets the correlating animation number.

1 Like