Set Visible Only When looked upon.

The first image is the Player Interact Action. The third image is a similar structured function in the Player to detect and guarantee that the interactive objects are in range, with it I made this two messages to sendo back the information to the objects themselfs if them are in range and aim of the player or not.

I wanted Items and Objects to have this on screen widgets within themselfs to turn visible when in range, the last image is what I thought would be the simple and effective way of doing so, but once I look on the Cylinder for test the message never go away.

If someone could help me fix it, or even better show me a more pratical way to apply this function to all interactives I would be thankfull… thanks.

Hi - you need to do the ‘is interactive’ widget inside the player.

You only need one trace, the second is redundant. Just do the first, and put the ‘does implement interface’ in there, if that flag is true, show the widget, otherwise remove the widget.

Here’s a snippet from my code:

Line trace function is exactly the same as yours, except it only returns if the actor implements the interface ( hit will be true ). Then I change the crosshair depending on the hit - my equvilent of your ‘press E’ widget.