How can I make pawns clickable?

This might be a stupid question, but I’m trying to make a point-and-click puzzle game, where clicking on an object, will cause an animation to occur, but I’m struggling to get the pawns to receive left mouse button clicks.

I’ve tried Event ActorOnClicked and using the on clicked event from a capsule, but neither worked.
I also have it on the level blueprint that on start up “Show Mouse Cursor” and “Enable Click Events” are both on.

1 Like

a stupid question

On the contrary!

You’re close. Note that when you use Event ActorOnClicked, the engine will perform a line trace using Visibility channel, as defined in the Player Controller:

image

A pawn’s capsule ignores Visibility traces by default:

With no other Visibility blocking volumes in the Pawn, the trace will not connect. Here’s one way to fix that:
image


make a point-and-click puzzle game, where clicking on an object

Note that you can add more channels / objects that serve your needs (that is going to be super useful in point & click!):


Here’s some additional resources:

https://www.unrealengine.com/en-US/blog/collision-filtering

2 Likes

WOAH!!! Thank you so much!!! It works now :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.