Make an AI follow an object

Hello, I’ve found this tutorial for create an AI Controller who’s following the Player.

But how make an AI following an object ?

Instead of setting the player character as the object you can set any other actor. You can retrieve the reference in many ways. One of which is to use a perception component with sight and/or hearing sense configured.

I tried like this, but i don’t know what to put in object input of my cast.

You can use GetActorOfClass node on Begin Play to get a reference to first instance in the world. I don’t think you even need to cast at that point. Just set it as the object.

1 Like

Did you also change the class to the gift box like in the tutorial?

I tried this so, but it’s not working, the character don’t follow the giftbox actor

yeah I did.
But not working with this. So I used a note AI Move To in the BP of the character