How can I create a `Look Button´? A button that can be activated when I at look it?

How can I create this? I´ve been thinking this for some time, I can´t think of a simple way to execute this. I thought of using a single line trace, but I don´t know how to use the hit return node.

Has anyone worked this out before?


Hits are structs. Drag the hit pin off and you’ll see “Break Hit”; use that to break the hit into its relevant child variables.

Those are what you really need; for example, check if the hit component has a tag that identifies it as a look-at button, and if it does, cast to it and call an event on its BP that activates it, for instance.

like so:


look at tom looman’s usable actor system (a linetrace to a blueprint with a begin focus end focus functions which work fine) you’ll have what shown or :

Here is an official Epic tutorial on just that. - YouTube It actually shows how to do it so you don’t have to clutter up your code.

Thanks for the Info guys! I will check out all the posted info!

That was exactly what I was looking for!