Free camera in the sandbox

Hello,

Would it be possible to replace the sandbox’s default ArcRotateCamera with a UniversalCamera, or at least add the ability to swap between both behaviours?

I’m working on a 3D model of a building. Our inforgraphist spends most of his time working with materials and texturing, but struggles with inspecting his work inside the 3D model because of the limitations put on the default camera, most notably the lack of free zooming and 360° movement.

Adding a free camera would greatly improve our workflow, as the only solution we could find was importing the mesh into a fresh project, which requires more transfers between us and a big waste of time.

2 Likes

As far as I know, you can pass some HTTP params to the sandbox URL, in order to customize some specific params. Example with this link :

https://sandbox.babylonjs.com/?kiosk=true&assetUrl=https://raw.githubusercontent.com/wallabyway/gltf-presskit-transparency/main/docs/MosquitoInAmber_withRefraction.glb&cameraPosition=-0.14,0.005,0.03&autoRotate=true&skybox=true&environment=https://assets.babylonjs.com/environments/studio.env

I never used it, but I can see in the source that there is a camera param … Maybe it can be used to tweak the camera type…

The easiest current workaround is to open the Inspector and click with the right button on the Nodes element:
image
Then add new Free Camera.
Then click on camera icon to make this camera active
image

Another option is to export the camera with GLB and then use Sandbox Camera button (it is displayed when there are more than 1 camera in the scene) to switch cameras.

2 Likes

Hello labris, thank you for your answer. I almost never use the sandbox myself, this was an issue raised by one of my coworkers who couldn’t find the option. Thank you for your time.

1 Like