I’m trying to spawn a 3D object at the world coordinates of the position of a umg button (those two icons in the red circle), however all my attempts didn’t yield even a close result so far (they always spawn somewhere at (9, -1, 10) or something, it should be somewhere at (80, 120, 0) though).
I tried it with the ConvertMouseLocationToWorldSpace-node and also some GetMousePosition-node combinations. i also tried the GetHitResultUnderFingerByChannel but this returns only (0, 0, 0), unless it hits solid geometry (like the egg in the center, which is at (550, 0, 0)). Then I tried to place a plane static mesh actor in the scene right in the xy-plane but as soon as I rotate that plane to fit the xy-plane no hit is detected anymore (besides that, if I press one of the umg buttons the result is the zero vector anyways).
So I think, what I basically need to do to spawn an object under the button is a ray-xy-plane-intersection. The ray needs to hit the screen coordinates of the button where it is pressed and then I have to calculate the intersection with the xy-plane. Unfortunately I didn’t find anything useful so far to achieve this.
Could you give me a hint please?