Offset position of control from GUI panel

https://www.babylonjs-playground.com/#QJDZ4G#3

Hi,

Endgame is having the sphere surrounded by panels with videos playing… so

As per the above, I want to get the offset position of the holographic buttons. Since I can’t seem to apply the video texture to the GUI.3dButton controls, I wanted to get the position of the buttons, set them to visible false and put a standard mesh I can apply textures to in it’s place.

Although the panels are linked to the original node, their relative position is just the anchor - it doesn’t give me the actual offset co-ordinates of each individual position taking into consideration the margins from the SpherePanel? I can see the container children mesh nodes have Transform Positions but no idea how to access this in code (children, position properties etc are always undefined on the button).

Otherwise - Is there a way to recreate the SpherePanel structure (things positioned in the orbit of a Mesh) using just Meshes, since I seem to be quite restricted when using the GUI library for things that aren’t necessarily GUI?

Is button.mesh.TransformNode what you are looking for ???

1 Like

Also about the distribution, it could look like this if you need a circle more than a sphere: https://www.babylonjs-playground.com/#QJDZ4G#5

1 Like

This is excellent - I didn’t really want to touch any Math but hey ho :slight_smile: Trig never killed anybody.

So I know the reason for GUI but it sounds like I can do alot with meshes anyway, if they have a click pointer event…

Thanks again guys, stars.