Create your own AI movement logic
When the character brain is set to AI, the actions stop being updated by the input handler (input devices). Now these actions need to be defined by code. This is what AI is all about, simulating a machine "pressing buttons".
In order to set up an AI character from zero you need to:
Change the brain mode to "AI" in the CharacterBrain component.
Add an CharacterAIBehaviour component to the character (wherever you want).
Assign the CharacterAIBehaviour to the CharacterBrain.
The AI behaviour
The brain will use the character actions from the current AI behaviour. Basically this behaviour task is to define this action frame by frame, as simple as that.
To create an AI behaviour you need to derive your class from CharacterAIBehaviour.
From there you can create your own custom logic. For instance, to simulate the AI running forward:
Last updated