Using C++ Task to follow the player

Hi everyone!
I chose to use c++ instead blueprint, and my logic ended up a little different than the one used in the video, I chose to set the actor in the PerceptionUpdate, so once the AI sees the player it keeps tracking it. Follows some images showing the logic:
AI
image
.cpp
image

I noticed that in c++ there is no GetValueAsActor, so I got it as an Object than I cast to an Actor and just work fine
Hope this can help or inspire anyone to make the tasks in c++ as well !
Cheers!

2 Likes

Privacy & Terms