Announcement

Collapse
No announcement yet.

Highlight a weapon when I look the weapon

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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 :'( !

    This is my blueprint program :

    Click image for larger version

Name:	custom depth.png
Views:	1
Size:	301.7 KB
ID:	1225085

    Thanks for the help ^^

    #2
    Originally posted by djanou View Post
    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 :'( !

    This is my blueprint program :

    [ATTACH=CONFIG]147891[/ATTACH

    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

    Comment


      #3
      Thank you ! In fact, my weapon don't have trace "visibility" collision on it's just this

      Comment


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

        Comment


          #5
          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

          Comment


            #6
            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.

            Comment


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

              Click image for larger version

Name:	weapopng.png
Views:	1
Size:	229.2 KB
ID:	1130885

              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 :

              Click image for larger version

Name:	vFAFpOpvQmyejIicLV_Anw.png
Views:	1
Size:	716.2 KB
ID:	1130884

              It's possible to correct ?

              Comment


                #8
                Originally posted by djanou View Post
                Hmm thanks for your comment, but i have suceeded to find the answer :

                [ATTACH=CONFIG]147974[/ATTACH

                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 :

                [ATTACH=CONFIG]147973[/ATTACH

                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

                Comment


                  #9
                  Okay but when i do this :

                  Click image for larger version

Name:	1.png
Views:	1
Size:	229.5 KB
ID:	1130887

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

                  Click image for larger version

Name:	2.png
Views:	1
Size:	15.1 KB
ID:	1130888

                  Comment

                  Working...
                  X