Collider without render

Hello,

I think my question will be non sense… but, I explain you my problem.

I try to do a multiplayer game, with a server.
The server will be the reference for all what happen, and I create node for every object (ship, asteroid, bullet,…). But I don’t associate them to a a render, because I don’t want any render in the server. I use the node only to have hpr, and pos.

Now, I want to manage collision between objects, and to provide information to client.

But It seems to manage collision, you have to create some collider, and to call traverse(render).
So I think, I can’t use this kind of collision management, because I don’t render on my server.

Do you have some tips, or advice to manage collision in this case?

Thank you

The variable “render” is just pointing to the default NodePath that is created automatically. You can still use this even if you are not actually rendering anything.

Set “window-type none” in your PRC file to prevent Panda from doing any rendering.
This can also be done with the following code at the top of your Python script:

from pandac.PandaModules import loadPrcFileData
loadPrcFileData('', 'window-type none')

Ok, I can reparent each node to render in this case, with below option (‘window-type none’)?

Yes that is correct.
With this option there will be no window and nothing will be rendered.

this setting must be applied for each class using directObject?

You should only have to put it one time at the top of your main Python script (outside of any class). Basically you want to put this before importing any other Panda modules.