Please HELP! How do I use mouse button down?

Avoid placing input in actors - it does not work the way you think it does.

So I’m trying to figure out how to use “mouse button down” to destroy the static mesh component of my actor when click on it.

  • in the Player Controller

if you don’t have a Player Controller (make one!), somewhere on BeginPlay instead:

image

  • in the actor you want to click:


Another good way of clicking on things is to use Left Mouse Down input in the Controller / Camera Pawn and Get Hit Under Cursor by Channel / Object.

However, you will not be able to Destroy Components unless you start casting to call an event inside the actor or use a blueprint interface.

2 Likes