#2D Screen-Interactable in a 3D scene
1 messages · Page 1 of 1 (latest)
If your "plane" is same sized or just a QuadMesh it is 2 triangles, so all you need to do is project your mouse position to 3d with the camera and use Geometry3D triangle intersection test on the 2 triangles to see if and where it hits the surface. With the hit position you can map that position to your mesh surface UV range to know where you hit in "2D" on that plane surface. With that ratio multi by your subviewport size to know where you are "inside" the 2D subviewport pixels.
or if you want to use physics there is a demo for 2d in 3d gui in the official repo
with physics you can also use a static body to know where you hit on the body and map to that position