Click on Character Event not working

I have a character I want to select by clicking on it, however when I click it does not do anything.

I have even put a condition that if the button pressed is the left mouse button, then I print a string.

I also set enable click events.

I also tried with a simple actor. Also doesnt work.

Is there anything else needed other than this for it to work? Thanks in advance.

Check to make sure the character can receive visibility collisions.

1 Like

Didn’t knew about that, thanks!.

No problem, I ran into the issue just the other day, drove me crazy haha.

Hey guys. Would you mind to share how to enable Visibility Collisions on a character? Facing the same problem as the OP but didn’t find this option anywhere. =(

so you can click your capsule component and go to Collision under details. Find Visibility under trace responses and make sure its not ignored.

Another way is to use the function/node “get hit result under cursor by channel” which seems to work even while the character capsule is ignoring visibility traces.

But yes your player controller should have “show mouse cursor” and “enable click events” checked in its default properties.

You could also change the trace channel used by clicks to your own custom channel. also done in the mouse interface defaults in the player controller. Since it seems pawns ignore the visibility channel by default you could add them to a custom trace channel called “clickable” and tell your mouse to consider that channel for click events.

fastest way is to click the capsule component in your character (or mesh) and go to collisions and uncheck ignore under visibility trace.