Interact text only when i look at the object

Hello everyone! So i’ve made the keycard blueprint and the text which says “pick up the card” and it appears when you’ stand near the keycard. But this text is still on the screen when i don’t look at the object but still stand in the trigger zone. How can i make the item pick up text dissapear when player doesn’t look at the keycard? Please explain in detail because i still make blueprints only with YouTube videos and can’t handle it by myself yet. Thank you :slight_smile:
Here is my keycard BP:

I don’t like how you’re having this kind of logic in the keycard. You will need this logic in all actors your FirstPersonCharacter can interact with. Not a beautiful solution. I would do this differently:

Inside the FirstPersonCharacter I would send one line/sphere trace from the camera position into the camera direction each tick and if the hit actor of that trace is an object you can interact with, you set the InteractText with the actor name. To get the actor name you should either let all interactable objects inherit from one master class or use an interface so you don’t need a dumb amount of casts.

Could try a longish box collision for the player character as a means of looking at the item.

So the flow would be something like :

  • Keycard : you are in my collision area, are you looking at me?
  • Player : Maybe, let me check my view ( longish box collision).