Search code examples
c++unreal-engine4unreal-blueprint

Is it possible to create dynamic AI path "on fly"?


How to dynamically create AI path between two objects?

For example, one AI character must go to the another AI character.

Is it possible to make AI path with logic "goto in front of the object", "goto in backside of the object" and etc? How to programm this AI logic - with blueprint or with C++?

Something like http://docs.cryengine.com/display/SDKDOC2/AI+Sequence alt text
(source: cryengine.com)

Can you provide examples for blueprint and for C++?


Solution

  • Yes, this is very easy in blueprints.

    UE4 creates a navmesh for your level that the AI can use to create dynamic paths to world coordinates or actors within the level.

    The following image shows the different blueprint nodes you can use to make AI characters move dynamically around your level:

    Blueprint nodes for AI move commands