Setting XR camera scale

When I enter XR mode, the scale is off.
I am the height of a corgi in the room, the controllers are pencils from a bookies and I am crossing the room on the back of a tortoise.
I have tried setting the camera’s _worldMatrix to BABYLON.Matrix.Identity().scale(0.1) but I think this gets reset every frame?
Is there a way to scale the world down (including lights) or the XR camera up?

First, a quick check with a scene that is known to be working as expected, Babylon.js - Hill Valley demo is advised. Controllers should look as if they fit in your hand.

That said, XR is a meter scaled standard. Reason being, since the headset IS the camera & you can walk around, it is important that what ever the amount you move will look the same as if moved that far in the real world.

Also, in XR, the headset is responsible for both camera matrices. This also means if the user takes the heads set off adjust the eye distance, and puts it back on, you do not even need to care. Much less have settings for different headsets somewhere in your code base.

You could iterate through all meshes without a parent, and scale them, but if you could go back earlier in your work flow, that would probably be better. I figured out XR was metered based looking at the spec around mid '18. Ever since, everything I have made in Blender is scaled for meters. It did not matter that I did not actually have a headset till 10/2020. It means anything I build could go to XR without doing anything.

Try not to fight gravity, unless you have a really good reason.

3 Likes