Mouse buttons refuse to work, both through direct Left Mouse Button Call and through Action Mappings

I have been struggling on multiple projects to get mouse buttons to work.

The simplest and latest one I have come across is this:

When running a debug I never, ever see any pulses through from the Left Mouse Button option into the Set (Is Casting Spell) of either type.

Exactly the same problem seems to be affecting another project of mine, in which I have been struggling for a while.

Is there something I’m missing. I just want to spawn a fireball when the user presses a left button and give it motion, as followed through by tutorials and example, but I never get any sort of feed saying that I’m pressing the left mouse button or not, thus ‘Is Casting Spell’ is never changed.

Any suggestions, please?

Only your controller receives input by default. If you want other classes to listen to use input you have to allow it in the defaults under user input to “player 0” or simply handle input all together in the controller and only call events in your character.

This section of the blueprint is from the MyCharacter default character.

All I’m trying to do is use the default character to cast a fireball forwards. I used the examples. I don’t understand why this default MyCharacter I’m using is not receiving input. If I set it to Player 0 then I’m locking it down. I’ve never needed to do such a thing before, and I believe it would cause troubles with multiplayer later on.

Well you can handle the input in the controller and simply pass down events.

This would also make it easier to write Ai later on since the Ai will obviously not press buttons.

Look at it this way. In your character you should handle all character specific stuff. Spells, animation States, etc. While in the controller you handle all input. You control your character.

I’ve just had problem with Mouse clicks not working, even if they are properly mapped for input actions.

I realized XBox controller is working and only mouse clicks have problems, and after few hours of struggling I discovered the problem:
“Mouse properties - Use mouse for touch” was checked.

After unchecking it, all works great. I was thinking it would be cool for application to have support for touch devices if they are connected, but appears it screws default mouse input actions so better leave it unchecked.

It’s somewhat weird the regular mouse input is consumed.

But “Use mouse for touch” means most definitely touch events are fired by the mouse (in this case instead of regular mouse events). So you only have to develop the game once and can easily port from mobile → Keyboard & Mouse.

The engine does always support touch devices. There are “Event Touch” listeners you can use regardless of the rest of your setup.