I have a 3d basic blank game and would like to detect a click anywhere on the screen, and get coordinates. I could only detect when clicking on a specific actor (created a new gamemode and connected custom PlayerController) but not on full screen. How to do that via blueprint ?
Hey @EarthHobbit!
What exactly do you mean by coordinates? Screen X/Y coordinates? Or ground coordinates on a plane/terrain?
hi @EarthHobbit ,
the GetMousePosition in the PlayerController class returns the cursor location.
Plug in to your click event (or keyboard press) and you’ll get the cursor location when the action is used. (in screen space)
My issue is not really the coordinates themselves (looking for 2D screen coords), but the fact that I don’t get the click event. How to configure / enable it ? And should I enable it in the Level Blueprint ? Thanks !
Hey again!
So you want to use “InputAction:LeftMouseButton” for this!
Technically it’s still an event, but “OnClick” is for “When this thing is clicked” not “When mouse button goes down”.
It works; so easy Thanks a lot
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.