Highlight a weapon when I look the weapon

Heyy,
I have make a blueprint program who when I look the weapon, a highlight appear in the weapon, i have no error but when I play and I look the highlight no appear :cry: !

This is my blueprint program :

Thanks for the help ^^

imo move that logic out from pickup to player character blueprint…
fire trace and as debug first use print string node if you are really hitting that weapon… if yes then just use some highlight FX… that node “set render custom depth” working?
also make sure your weapon have trace “visibility” collision on

Thank you ! In fact, my weapon don’t have trace “visibility” collision on it’s just this :wink:

I tried Dot Product for Highlighting things, but it uses Post Processing which tends to slow the engine a little.

but how can I do for toggle a message when I look the camera and when I’m in the trigger ?
(In fact, I want to toggle the visibility of the name of the weapon when i look the weapon and when i’m in the box trigger)

Thank you

If you’re using a text component rendering the text in-world, just set the text component’s visibility to none/zero/false to cause it to disappear. Set it to true to reappear. If you’re just talking about debuging, just drag the pin of the object hit into a printstring node and it’ll automatically work. If you want it to affect text in your UI, look up UI tutorials, but mostly its the same/get object name->set text.

If you mean you got the weapon highlighting to work, and are wondering how to turn it off if the player isn’t looking at it, just add in a retriggerable delay to the highlightweapon event so after .5 seconds or whatever it’ll autoturn off the highlighting, since the delay is retriggerable it won’t turn off until the player is no longer casting to it. That’s one way anyway.

Hmm thanks for your comment, but i have suceeded to find the answer :

But i have an other problem xD : I have 2 mesh who have a reference to the same blueprint, so when I have the crosshair in one of the mesh, the 2 text appear like this :

It’s possible to correct ?

i think its because you not specified which text to appear… drag wire from “cast to rifle pickup” and use its text reference

Okay but when i do this :

but the text don’t disappear when i’m not in the trigger and I have an error :