scene.useRightHandedSystem = true and billboard mode


I’ve been trying to convert an old project from a-frame into babylon to get more knowledge of what needs to be done.

I’m a bit confused as to what is the best practice around new projects and scene.useRightHandedSystem

Since gltf is right handed, should i prefer setting the scene to right handed?

When setting to right handed, what problems should I be on the lookout for?

So far I think I found a problem with billboardMode where if in right handed mode, the face is always facing away from the camera


babylon.js is by default left handed and thus mostly tested in that mode.

glTF loader will take care of everything for you so no need to use scene.userRightHandedSystem unless you want to.

i will make sure to fix the billboard issue you found for the next commit (in a couple of hours)

I have vector3s that are stored in a DB in right handed.

Is there an easy way to convert between the two?

return new BABYLON.Vector3(v.x, v.z, v.y)

I believe?

then a quad if you run into it I think is:

return new BABYLON.Quaternion(-q.x, -q.z, -q.y, q.w)

I’m not 100% on that, but I think that sounds familiar from math class decades ago… o_O… But I think this is assuming z is up (Unity coordinate system)… so It might actually be wrong… Actually thinking about this a little harder, this script would need to change because we use y as up not z.

The easiest way is to create a root TransformNode with scaling set to 1,1,-1 and everything will work :slight_smile:

1 Like

that’s a cool trick