Capture left/right mouse click globally
I have a problem with mouse click (left or right). I take an example from the sample "Puzzle". One different is that I need capture mouse click from Pawn (witch is connected to PlayerController) no matter what was clicked. (In sample puzzle blocks are "clickable" by its geometry, but in my idea there is no "geometry").
I want capture click on screen and create object in this position, but I stuck at capture left click, I can get mouse coordinates from Pawn but not the click event. Position I'm getting form Pawn::Tick function.
[UPDATE] Im using
Have you tied your "TriggerClick" action to the left mouse button?
You can do this in the editor in the Project Settings window. Under Engine->Input, there's a Bindings panel.
You can also do this in code by collecting the UInputSettings object and adding an AxisMapping or ActionMapping (for a click event you would use ActionMapping).
You can also manually add the action mapping in your Input.ini file.
answered Oct 12 '16 at 09:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here