Flying enemies AI

Hey there,
I know this question is asked so many times and I have read most of the topics and post.
But I need your idea about my situation.

Assume different buildings on a terrain and those buildings have door and windows. Also there are bridges.
There is a flying enemy in my game which can travel from point A to point B. They can fly in open path or they can go into the buildings from door and windows.
They can attack player or just moving in place and these kind of behaviors.

As I notice, 3D pathfinding and using Point Graph in big world are heavy for CPU.

So what is your solution for this problem ?

Also I think about different layers on air and flying enemies can move between layers. But not sure if it is possible to achieve and recognise emptiness in windows. (Doors I think is okay because they are on ground)

Point graph is definitely going to be your best bet.

From what i understand, it’s not necessarily the size of the world that’s CPU heavy, but rather the number of points in the graph. If you configure the graph so large open spaces don’t have many points, I don’t anticipate a huge CPU load there.

@gigazelle Thanks for the reply.

I think for creating 3D space for pathfinding with point graph, we should put many nodes in that specific space (In all axes). So as you said by increasing number of nodes, it gets heavier. Is it right ?

Is it possible to use ground pathfinding information, local avoidance and offsetting (In Y axis) to achieve kind of 3D pathfinding ?
For instance, there are building (With door and windows), objects and other stuff on the terrain and generating graph for it (Ignore high walls or building walls in generating but not objects like boxes and so on, so they are still walkable) and try to use local avoidance (Not sure about phrase, maybe it is better to call it raycast) and if something block it in specific height then shift it upward or downward to avoid it.

Is it possible ?

Please answer Flying enemies AI and Flying enemies AI.
@aron_granberg

Hi

Units that can fly freely in 3D space is not a use case this package has been optimized for.
A point graph is your best bet, but it has its own drawbacks.

You will at least want the pro version with Optimize For Sparse Graph enabled on the point graph to reduce the CPU cost of finding the closest nodes in such a huge graph.

But as I said before, this package is not ideally suited for that kind of pathfinding.

@aron_granberg
Hey,

I have pro version.
For using point graph, for example in even tiny space I should put so many nodes manually ? (Or generate nodes in that specific space ?), because the agent exactly go to that node.

image

Also what do you think about my 2 ideas which I have mentioned here ?