Left Mouse Button Event to spawn ParticleSystem
I'm simply trying to spawn a particle system in the game space when the user does some mouse input.
The problem is the Left Mouse Button event isn't firing in my GameMode or PlayerController (tried both).
I also don't have any actor I'm interested in activating this with, I just want any click to spawn the particle system.
Edit: It's probably because I'm placing the Blueprint event in GameMode and/or PlayerController?
Edit2: I found this in the documentation which solves my issue, but I was hoping I wouldn't have to recreate the blueprint code in each level for the click event.
Use Blueprint scripting (either within the Level Blueprint or any Actor Blueprints) to process mouse interaction.
Edit3: So now I've attempted to get onClick events to fire for the Box Trigger and Trigger Volume but I'm unable to receive any events from them as well.
Edit4: So I added a Mouse Right Click event to the level editor; that triggers, and Mouse Left Click doesn't.
Anyone willing to explain why, or what kind of gotchas there are here, no idea what's going on now.
Alright so by default nothing but your player controller and player character receive input and having input directly inside of your gamemode is pretty bad practice anyway because if you would ever decide to go multiplayer you will have to completely rewrite that.
However that it doesn't work in your player controller as well is rather strange. Have you selected the player controller in your gamemode? Or is that still using the default? Because that would mean you don't actually have the new code running when testing.
And as last little tip. Don't use those static events like (Left Mouse button) or (Space Bar). Go to "Edit", "Project Settings" and under "Input" you can define input events. But instead of just having a single button you can use there, you can add as many as you want. This allows you to enable gamepads without near to no additional work, it allows you multiple bindings and eventually fairly easy key rebinding (though not in BP only as of yet sadly).
I hope this helps a bit. I am absolutely unsure why it would work with right but not left click. Maybe a look at your setup would help but it seems rather strange.
answered Mar 01 '15 at 08:58 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here