Add collision/separation support to NavMeshCharacter

What would you like to request?

I would like NavMeshCharacter to have built-in support for collision/separation between moving NavMesh characters and other characters.

Currently, using NavMesh navigation means I seemingly have to choose between reliable navigation and normal Physics3D collision behavior. Adding Physics3D to a NavMeshCharacter can interfere with navigation and prevent it from working correctly, while leaving Physics3D disabled means the player can simply walk through enemies.

The feature could potentially include:

  • a configurable collision/separation radius

  • separation between NavMesh agents

  • avoidance of other NavMeshCharacters while moving

  • allowing NavMeshCharacters to block the player

  • enabling/disabling character collision at runtime, for example so a dead enemy can be walked over

Why are you requesting it?

In a 3D game with multiple enemies, navigation alone is not enough. Enemies need to follow the NavMesh while also behaving like solid characters.

For example, if several enemies surround the player, they can overlap each other, and without additional collision objects the player can walk directly through them.

I tried using Physics3D for this, but Physics3D and NavMeshCharacter do not seem to work cleanly together, so I ended up needing separate invisible collision objects and custom logic just to make living enemies block the player.

Built-in character separation/collision would make NavMeshCharacter much more practical for games involving:

  • groups of enemies

  • narrow hallways

  • doorways

  • crowds

  • melee enemies surrounding the player

  • characters that should block each other

Ideally, NavMeshCharacter would continue handling pathfinding/navigation while a configurable collision or separation radius prevented characters from occupying the same space.

I think everything you listed is already possible. Maybe the documentation can help you:

There is already a property for this in the character behavior.

Avoidance is always enabled between characters with the behavior enabled so I’m surprised it doesn’t work for you.
(What’s the difference between these 2 items?)

Setting the 3D Physics behavior as Kinematic on the ennemies doesn’t work?

You can deactivate the behavior. All movement behaviors work like this.

No, as soon as I enable the 3D Physics behavior on the enemies (set to Kinematic) while NavMeshCharacter is enabled, the NavMeshCharacter movement/pathfinding stops working.

Am I doing something wrong here? Are these two behaviors supposed to work together?

Here is a video showing the problem. (I know running “move” every frame isn’t ideal, just a quick example)

https://jumpshare.com/s/jfduoFR5oHiFkqGTj24w