PhysicsViewer issue when using floating origin on a single scene

Hey there!

I am experimenting a lot with the new experimental floating origin feature, and am trying to use the physics viewer.

When using useLargeWorldRendering, it works perfectly :ok_hand: :

But now if I want to set floating origin for a single scene only, I set useHighPrecisionMatrix and useHighPrecisionFloats to true at the engine level and useFloatingOrigin at the scene level, but the physics viewer seems to suffer from imprecision.

Is there another flag that needs to be set? Also, what is the use case of useHighPrecisionFloats when useHighPrecisionMatrix seems sufficient to get floating origin working :thinking: ?

cc @georgie

1 Like

Thanks for reporting @CrashMaster, here is the fix :slight_smile:

Enable per-scene FloatingOrigin in utility layer renderer by georginahalpern · Pull Request #17344 · BabylonJS/Babylon.js

1 Like

useHighPrecisionFloats is only applicable for WebGL and is true by default (so no need to configure it). It defines whether the shader is using 32bit or 16bit floats

1 Like

Thanks for the quick fix and the answer :slight_smile: