I once upon a time tried to get the Babylon repo to build so I could contribute, but being completely new to typescript (JS and C# guy here) it kind of intimidated me and I gave up. I still plan to get it all working some day and figure out the ins and outs of TS but for now I have to ask you great devs to implement things for me (upon approval, of course).
So, I am thinking it would be cool to have a getDistanceToCamera() function that uses the camera’s global position, so it still works when I parent the camera to another thing. I am parenting the camera to allow it to rotate on all axis (so you don’t get the weird rotation around the poles but that breaks the getDistanceToCamera function. I had a similar issue here Gizmo size by TrevorDev · Pull Request #5398 · BabylonJS/Babylon.js · GitHub which TrevorDev fixed but oddly enough that code doesn’t seem to use that function so that function was never changed, unless I am mistaken.