Question about colliders on RecastNavmeshModifier gameobjects

  • A* version: 5.3.7
  • Unity version: 6.000.0.32f1

When using RecastNavmeshModifier with the following settings:

  • Include In Scan = Always
  • geometry source = Collider
  • Surface Type = Unwalkable
  • Dynamic = true

I have noticed that regardless of the number of collider components attached to this same object, it will only use the first (topmost) one.
This actually suits my use case, but is this by design? (or is it likely to change in future)
I ask because that behaviour is not the same when using Recast graph layer masks and collider rasterization, which seems to consider all active colliders.

Another reason I’m asking around this, is because RecastNavmeshModifier does not seem to consistently observe the first colliders enabled state i.e. it grabs the collider bounds whether the collider is enabled or not.

I could not spot this discussed in the docs (RecastNavmeshModifier - A* Pathfinding Project)

Technically, yes- I looked into the code and this component uses TryGetComponent() for getting the Collider (and Mesh Renderer and Mesh Filter). Since TryGetComponent fishes for the first match, so does RecastNavmeshModifier.

Probably not, just by virtue of how it works. But if you tell me what you’re needing from it I can probably help you cook up something that works. And if we can’t we can make a suggestion to Aron to add functionality to maybe select a specific component as the source.