Having VR controller trace issue

Reproduction: I am using a single line trace (being run on a custom event, powered by tick) to find out if the player is looking at anything he/she can interact with (in this case just to show the name of the actor).

Working in Dev mode but not game mode, the mouse works fine but trying to use the VR controller is not working

The trace itself works, as in it will find the object and trigger the blueprint. However, since the event fires at the speed of tick, it is CONSTANTLY firing the blueprint.

I am trying to figure out a system where once a player's trace triggers the blueprint, only do that blueprint one time, until the player is no longer looking at the object via trace.
I only want the blueprint to fire once WHILE looking at the same object via trace.
If the player is no longer looking at the same object, trace as normal again until the player selects another interactive actor.



I need to be able to SHOW item name while the player is looking at the item, and HIDE the information when the player is NOT looking at it…. Via a HUD.
    I have tested the HUD blueprint on its own
    It will show the Actor name.
    I have also tested that the outline of the actor highlights when the trace triggers.
    But when I try to link all of the above elements together it falls down…

When focusing an object you have 2 ways to make it trigger its highlight effect only once:

  • use a “DoOnce” node then do your stuff (set HUD visibility), when the object stops being highlighted, you reset the DoOnce node
    or
  • when highlighting an object, you check if a boolean called “IsHighlight” is equal to false, if so you pass it to true and you do your stuff, when stopping the focus on the item you check if “IsHighlight” is true, if so you pass it to false and you deactive your stuff.

These are the two solutions that jump to my mind.