Mouse click events in First Person Template
After searching for a little in the UE4 answer section, I feel I need to post question here, for I did not find similar problem. I am a new UE4 user, so I am just starting to learn all the ways to use UE4. And to get more confortable with the engine, I though I would try to create a boardgame with simple graphics. For that I needed a RTS(real time startegy) controller, what I could use to navigate in the boardgame scene. I followed this tutorial(link) to get myself a RTS controller. Finished the video and all worked like it did in the video. So far so good.
But then I wanted to create an Mouse event(OnClicked) so I could start designing the system. This is where the problem is. For some reason, the Mouse input events do not trigger. I guess it something to do with the First person Template I am using(what was used in tutorial). The mouse events itself work fine in top down template for example, but not in first person template.
So if anyone has any ideas what settings I need to change or Blueprint code to write, I would be very thankful. If you need any additional information, let me know.
Alright so first of all... handling user input inside of your level blueprint is in the very large majority of cases bad practice.
You should handle events inside of your controller or at least character. Those also accept input by default. This is especially important once you go into multiplayer games as all players have the same level but all have different cursor locations. It is possible to enable input. If you go into the "Class Defaults" (directly left from the "Play" button when you have your level blueprint open) you can set "Auto Receive Input" from "Disabled" to "Player 0" (which will select the first player connected to your game... in a single player game simply your player). This will enable your mouse input.
As I said. I would recommend handling those inside of your Player Controller.
answered Mar 16 '15 at 11:08 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here