Feature request: Support mutiple/separate physics scenes

  • A* version: 5.3.1
  • Unity version: 6.0.33f1

Would be nice if there was proper support for multiple physics worlds (there seem to be stabs to support this in various areas in the code base). In our case, we’re doing scene stacking to host multiple sessions in a single server instance. Unfortunately RecastGraph and most provided agent implementations use Physics.XYZ straight off. RecastGraph seem to always collect its colliders based on the scene that happen to own the Astar instance etc.

We’ve patched all calls in AIBase, added some extra overrides via RecastGraph.CollectionSettings etc. But it feels a bit hacky, would be nice to have this support straight out of the box.

1 Like

Hi

Yes, support for this is a bit spotty.

The FollowerEntity can use any physics scene if you set the PhysicsSceneRef component on the FollowerEntity.entity.

See PhysicsSceneRef - A* Pathfinding Project

The recast graph can, as you’ve seen, change its physics scene, but it does require some minor code changes to actually expose it. Did the changes work well for you?