Get the position of mesh from gltf import (__root__)

Dear Forum!

I want to focus the camera on different meshes in a loaded gltf by double clicking them. But i don’t understand how i can access the position information of those meshes if they are parented with root. I’m trying different methods now for days - and i’m just stuck :confused:

made a simple playground demo:

I want to alert the meshes position on double click:
https://www.babylonjs-playground.com/#WGZLGJ#1072

Thank you

Hello,

how about something like this - https://www.babylonjs-playground.com/#WGZLGJ#1073 ? check each doubletap (double click in pointerish), and if there is a hit - output it?

2 Likes

great thank you!

here’s the version that works:
https://www.babylonjs-playground.com/#WGZLGJ#1079

1 Like