Download

Object Picking

Where is the tutorial on object picking with the mouse?

I googled my **** off all night last night and really didn’t see much that is of help for a nooblar to Unreal like myself. I saw a few attempts with Blueprints events, and a few code snippets that weren’t even complete enough to tell what class they were implemented in.

This topic seems like a fairly common one. Surely, there is a tutorial out there or a dedicated section in the manual?

If I can create 4 boxes in the editor, click one with the mouse, and via code, detect that click and have the clicked box turn red, that would make my day.

On any actor blueprint there is an ActorOnClicked function you can override. (near the bottom of the list in the screenshot)

&stc=1

So, how do I access that in C++?

As Xenome posted, override FActorOnClickedSignature OnClicked