Godot Jolt Collision Groups

Godot Version

Godot 4.4, Mono, Double Precision

Question

I have recently started using Godot to develop a space game. This is a multiplayer game and my question relates to the server specifically.

Objects can be very far from one another at any given time based on the design of the game. I would like to separate these objects by region and limit collision checks between objects to the regions they inhabit.

I already organize objects by position since I have to stream local objects to players.

I believe this is an improper use case for layers. Besides, there are only 32 layers.

I’ve read about collision groups, which seem to be the correct solution, but they’re not mentioned often and I am confused on how to use them appropriately. I guess that’s my question: How can I organize a ship and the players on that ship into a collision group so that collisions are only checked between the objects in that group? Manually, I can add a ship to the group if it enters the same area.

Is this a waste of time? Does the built in BVH already cover this efficiently?

The octree/BVH should handle this, have you run the profiler and come up with a sizable collision performance hit?