Hello everyone!
I made this playground where you can create a circle and move it around or change the radius
(double click to create center mesh, right click to finish)
Everthing works fine here, when the ground mesh is not rotated:
https://playground.babylonjs.com/#PYVQ5E#20
Here’s the playground with my qestion:
https://playground.babylonjs.com/#PYVQ5E#23
I’m wondering if I could use the gimo so the center mesh of the circle will always “touch” the ground. So if I move it with the yPlaneGizmo the mesh will have same y position as ground.
I used getHeightAtCoordinates but it doesn’t work in my case. Do I need to have some kind of ray from the mesh to check grounds y position? Or am I overthinking it?