Mouse clickable Character and collision

Don’t do it by actually trying to click the mesh, do it with a blueprint interface.

In the content browser, right click and ‘blueprint’ → blueprint interface.

Let the new function just be IsClicked, compile, save.

In the character, click ‘class settings’ and in the details there’s a big Add button, choose your new interace.

Compile ( important ).

Then right click in the graph, you’ll set EventIsClicked ( or whatever you called the function ):

308069-clicked.jpg

Mind you get the right one, there will be several, for different uses.

I don’t know exactly how you’re doing your mouse right now, but I put this in the level BP, it works fine:

PS: With this method, you can say to any actor ‘hey, you were clicked’, it’s up to that actor to respond in any way you like. It can be a player, like this, or a door…

1 Like

I need to be able to click on a character in order to select it.
I’ve created a Character blueprint object and set it’s mesh to a skeletal mesh, the skeletal mesh have some hair bones.

I have a mouse game mode and a mouse player controller,
the OnClick event on the skeletal meshe will only work (be invoked) if the mesh is set to ‘Block all’ in the collision settings.

When I use the ‘Block All’ option, the hair and cloth goes haywire, bounces all over.

Can’t find a fix for the issue, am I using the trying to catch clicks the wrong way?
Is there an issue with bones?

the Character works fine (Hair and cloths react to movment) if the skeletal mesh collision is set to ‘CharacterMesh’ but than I cant detect mouse clicks…

A video showing the issue:


On the left a character with collision set to ‘CharacterMesh’ (on the mesh component)

On the right collision is set to ‘Block All’

Please assist.