Announcement

Collapse
No announcement yet.

Line Trace by Object

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

    Line Trace by Object

    ok well I'm attempting to use the "LineTrace by object" to find an object within range of my fps player, and get information from it

    the next three pictures show what should be good code I think

    I send out the line but it never returns with target actor "ai" even if the line traces clearly shows it hits, not if I set the == to false and let it pass it opens the menue that is called to open, so that means something is wrong with the trace no?

    Click image for larger version

Name:	Get actor.png
Views:	1
Size:	78.6 KB
ID:	1192140Click image for larger version

Name:	lineTrace.png
Views:	1
Size:	129.3 KB
ID:	1192141Click image for larger version

Name:	Problem.png
Views:	1
Size:	67.4 KB
ID:	1192142

    #2
    I suggest you put some Print nodes to see what's going on.
    ProBoon, Old-School FPS, Open Source & Tutorials
    Support Project Boon on Patreon

    On Steam Soon, Click Below

    Comment


      #3
      without casting how do I print out what actor type is getting selected. there should only be 1 im targeting for now, but innless I cast I cannot force a name variable out of it in order to know what it is, or am I just very wrong I am going to run this trace on structures set to dynamic, and possibly even maybe static objects in the future otherwise Im just not sure where to put in the prit string to give me the infor I need.

      as shown the break there on display is called, and even the branch is called but it always calls false if I put a print sting there that holds true.

      when i get home ill post my math for how I send out the trace maybe its sending from the wrong location so everything is just an optical illusion, but for the most part all my other lines draw correctly i think

      Comment


        #4
        You don't need casting, put a Print node and link whatever you want to chek to it. If it's an actor Unreal will add an actor-to-string node.
        ProBoon, Old-School FPS, Open Source & Tutorials
        Support Project Boon on Patreon

        On Steam Soon, Click Below

        Comment


          #5
          thanks you MasterNeme my issue was I just needed to tell the line trace to not only ignore the player controller, but I also needed to tell it to ingot the controlled player

          my line trace would cast at the camera, and hit the player before hitting the npc

          Comment


            #6
            Great, good luck with the rest of the project.
            ProBoon, Old-School FPS, Open Source & Tutorials
            Support Project Boon on Patreon

            On Steam Soon, Click Below

            Comment

            Working...
            X