Hello. I started to use the AI controller recently to take advantage of the Navigation System. Before I was using a state manager and states to just simply move and rotate the Pawn in the world.
So the state manager has different state objects initialized and it sits in the AIController class. From there I can switch the states.
I started to confused myself a bit because I realised the logic in the states needs to use functions from the AIController class like for example MoveToLocation.
So when I decide to Switch the state from Idle to FollowThePlayer the AIController access the state manager and changes the state wich is a speparate object inheritedfrom UBaseState or smth. So inside there I have to cast back to the ai controller and run another function from AI controller that uses moveToLocation.
Seems a bit weird instead of just running the code straight in the AIcontroller to run a state that gets a pointer to the aicontroller and runs a specific movement logic.
Is this good practice ?