How to Use Ai in 2D sprite Like Enemy follow player in 2D?

So I am working on something and in my project square is my player and circle and triangle are enemies So How can I move my enemy towards the my player I tried lot of things but I failed… Please help me :slightly_smiling_face:

Hi,
There are dozens of ways to move AI around. What is your desired way to control AI? C++, Behaviour Tree, or only BP? Also, do you have any knowledge about UE navigation system?

only BP
and I don’t have any knowledge of the navigation system
can you provide me with a simple way? using BP :slightly_smiling_face:

Hi, sorry for the delay

The most important question is will the AI be required to avoid obstacles, or the movement will be just straight toward the player.

If they should avoid anything, you should use built in Navigation System
Use this link to setup the basics:
Basic Navigation in Unreal Engine | Unreal Engine 4.27 Documentation
at the end of this article there’s an example how to control AI with blueprint using node AI MoveTo, but it won’t work if you have no Navigation volume on level.

If you need just straight forward movement, you could use Event tick and set roatation of an AI to look at player, then add some location (controlled with variable, it’s basically speed)) towards its forward vector.

Let me know if that will suffice or you need more details.