Download

Show Widget once Character in collision area of actor AND the line trace hits

Hello!

First time using these forums but I’m a bit stuck on how to get my blueprint to work properly.

Currently I’m trying to make a “Press E to Interact” widget pop up over an Actor, when a Character both goes inside the collision area, as well as looks at the Actor.

I have the widget set up, I have the collision area set up, and my Character can see the widget when I enter the collision area, however I can’t figure out how to also factor in my Character actually seeing the Actor. The below screenshots are what I currently have set up.

First one is my visibility of the Actor when my Character begins and ends the overlap.

The second and third screenshots is just the line trace I have set up, as well as my “use” action input



hi @Not_Fr0z3n

so if you approach an item backwalking , you trigger the widget even if you dont actually look at it.
And you want to trigger it only if your char is relatively looking to the item .
Correct?

I would say that when you enter a triggerbox
you active the raycast in tick event or similar
if the raycast hit an object , he check if interactive (via Tags or via interfaces)

if it is seen for the first time, make widget visible
if was already visible do nothing,
when is no more in raycast, make it invisible