I wanted if someone can tell me or point me to an article where I can understand how to use the very basic AI to get my pawn to move to a location or maybe follow another pawn in the level.
What I’ve been able to find until now:
I’ve with the help of available tutorials etc, know that using blueprints is pretty easy, create a custom AI based off of the AI Controller ( or even a BP off of a C++ class that extends AIController). in the event graph, use a AIMoveTo function. Feed the output from getControlledPawn into it and the pawn and set the target to for example, get PlayerCharacter and call this every some seconds using a setTimer function. This works well.
Tried to use just C++ to do this, but have not been able to achieve this yet, I’ve been able to find the getControlled pawn that is in the top level parent class, Controller, AIController has MoveTo and MoveToLocation (I think), but they don’t take a pawn input, just calling them with the destination does not work!!
I’ve set the Nav Mesh, and in my character I’ve set AIController (->) to my custom AI Controller class.
Should be something really simple, would appreciate if someone can let me know how to do this simple thing. I’ve tried to look for tutorials and video’s but all of them are talking about sensing components and Nav Areas’, custom Navigation etc, not sure if I need to do all of that just to simply move a character from the spawn position to the target.
Would appreciate any information.
Thanks in advance,