Problems with collisions and sandbox

i use the sanbox from babylon and is very usefull,
but when i export to .GLB the objects and the camera don’t use the collisions, in the sandbox the collisions are detected, but when i use it in my server everythings go wrong.

somebody can help me please

thanks and regards

Hi atom182,

If you’re trying to code your own viewer, collisions for meshes and cameras aren’t enabled as features by default; you’ll have to set them up yourself. You can look at how the Sandbox itself sets this up in the Sandbox source code. I don’t think the sandbox technically uses collisions, but simply sets camera behaviors to prevent the camera from getting too close to the mesh.

If you only need a relatively simple viewer, however, it might be easier to just use the Babylon.js Viewer rather than coding your own. Not sure if that will be usable for your situation, but if so then it might save you some time. Hope this helps, and best of luck!

Thanks for youre help