Greetings,
I have a few questions on the Unity phyisc engine.
What I want to do is I have a unity server in which the players will have rooms, I will run a phsic simulation for each match room, but I want to do it in an optimized way.
PHYSIC SCENE ITERATION
First of all, the steps I tried were to create a PhysicScene for each room, but I think it uses one thread for each physic scene, even if the rooms are empty, the server loses a lot of performance when I open 100 physic scenes.
SINGLE SCENE - DISTANCE BASED
I tried to do it separately in a single scene.
Imagine a square spiral, I think to put the objects of the rooms at equal distances from each other, so I aim to get rid of the physic Broadphase phase of Unity.
I think if there is an optimized distance between each room, they will not calculate with each other.
LAYER BASED
I thought about Layer Based Separation where the maximum number of layers limits me.
I thought to turn off the physic between layers for each room, but this is useless when the number of rooms increases.
There is an API like ignoreCollision in Unity for colliders, I guess there is nothing similar to this for physic, just simulate certain objects with certain objects or I could not find a piece of code that I could simulate them manually.
Does anyone have any suggestions, investigating a similar situation?