Hi, Hope you are well?
This morning, Iāve been looking around the different approaches that could eventually work for this. It seems a bit more complex than I first thought but⦠donāt worryā¦as I said, weāll get you there 
I identified 3 ways to approach this; One of which I explored a bit further.
Approach 1
Use the gizmo manager with custom mesh:
https://doc.babylonjs.com/features/featuresDeepDive/mesh/gizmo#gizmo-customization
Approach 2
Use the gizmo manager with app bar:
https://doc.babylonjs.com/features/featuresDeepDive/behaviors/meshBehaviors#attachtoboxbehavior-appbar
Approach 3 (The one I pushed further):
Based on the GPU picking PG.
The idea is to not use gizmo at all. Instead, normalize all to unit cube and use bounding box to create meshes (as markers) to link with 2D GUI.
I would like to require the insight of some more knowledge people than me before moving further.
@roland May be you would kindly have a look at this and give me your feedback?
May be particularly focusing on the last one which could be the most promising. Unless Iām overlooking something.
Approach 3 PG
base version
hiding gizmo through layer mask (click on button with label ā1ā to test view rescale and check that the buttons remain attached to the edges of the bounding box)
alt version (same PG butā¦
showing gizmo (problem with layer mask - however, here you can use the gizmo to rotate, rescale,etc⦠and check that the buttons always face camera and remain attached to the boundingbox)
Let me explain this PG.
Itās actually largely inspired from the GPU picking PG. Reason why I ask you;)
The thinking and requirement is the following:
1) Requirement
- Need to normalize all meshes to a unitcube. Preferably also zero all from rotation/rotate.
- Need to wrap the mesh hierarchy in a parent (normalized to unitcube) that will become the boundingbox parent
2) Building
- Create a transformNode parent to host āmarkersā (in the form of meshes)
- Create n markers (5 in this PG in the form of āspheresā)
- Knowing that we are building on unitcube (with a 1,1,1 unit), parent spheres to the transformNode and position them to where they belong (in corners and 1 in the top or bottom middle)
- Parent the transformNode to the boundingbox wrapper (created for the mesh/mesh hierarchy)
- Create a 2D GUI in FS
- Create 5 buttons
- Use linkWithMesh to link each button to the marker spheres.
The advantages I find with this solution is that
-
buttons always keep facing camera, keep with their size and keep attached to the bounding box edges WITHOUT any further need to add code to rescale, position, rotate. Itās seamless and straight forward (so I think)
-
while being attached to this transformNode (or anchor), it can be re-parented to any other mesh (providing as per requirement, that all these meshes are first ānormalizedā)
From there - and as opposed to what is currently in the PG - I would not be using the gizmo manager. Read there would be no gizmo. Actions would be done through the buttons only using mesh/drag/pointer behavior(s). We could show just the bounding box or create a custom visualization of the bounding box (if you want to keep with your dotted lines).
Any thoughts around this (and eventually a hand or an alternate version/thinking) would be (as always) highly appreciated. 
Meanwhile, Both (and All), have a great sunday
⦠And Iāll be back on this by tomorrow morning
