Pathfinding for a specific unit

Hey, I would like to have a pathfinding specific to a unit: a shark.

The other units would be on land and they would not use the water as a possible terrain to walk on.

Something a bit tricky: the water is a trigger and not a standard collider.

How can I detect the water and make only the shark use that part of the pathfinding?


It’s probably easiest to use a separate graph and configure the collision detection to handle the water.
Possibly you might have to use a GraphUpdateScene component to mark out the shoreline or a custom script.

1 Like

Thanks, what about the fact that the water is a TRIGGER. Do I have to modify code to make the detection work for that?

Is there a way to copy/paste the settings of a graph to another?

Hmm, possibly.
You could have a separate physics layer with colliders that you only use for pathfinding and nothing else.

I’m afraid there is no way to copy paste graph settings at the moment.

The graphs from the pathfinder are not fully compatible with the prefab system.

There is no way to revert the individual values like other prefabs can.
It would be great that you fix this whenever possible @aron_granberg