How to display coordinate frames of all meshes at once

I have a bunch of meshes rendered and they all have different rotations. I would like to display each mesh’s local coordinate frame, all at the same time. Is this possible? All the while keeping in mind that the meshes also have parent/child relationships

I don’t understand what you mean about “frame”. Isn’t it just the bounding box you’re talking about? https://www.babylonjs-playground.com/#4AJ16M#61

For local frame of reference using Gizmos https://www.babylonjs-playground.com/#4AJ16M#62

Lines 19 to 21 to stop drag behavior of Gizmos Use Gizmos (eg. Drag arrow, Bounding box) - Babylon.js Documentation

3 Likes

Oh sorry I meant the frame as in the x y z axis coordinate frame

Thanks so much! That worked very well

As a follow up: is there a way to make the gizmos stay at a fixed size? I can only set the positionGizmo.scaleRatio, but I don’t want my gizmos to change size when I zoom in/out of the scene

Thanks!

@trevordev might be able to help with the Gizmos

An alternative would be to use the function from lines 71 to 99 (called on line 20) in this PG https://www.babylonjs-playground.com/#UBWFJT#2. You can then use the size parameter to control the length of the axes.

1 Like

I will make a PR to expose an updateScale on gizmos which can be set to false to disable the non-fixed size. Once that PR is merged this playground should work.

https://playground.babylonjs.com/#N56AHG

3 Likes