Announcement

Collapse
No announcement yet.

How to make multiple MultiLineTraceByChannel?

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

    How to make multiple MultiLineTraceByChannel?

    I want to make 4 MultiLineTraceByChannels which goes Up, Right, Down and Left. I'm guessing i'm going to have to use some sort of rotation node, but how would i make 4 trace lines? Keep in mind i'm fairly new to Unreal Engine.
    Don't refrain to ask further questions about my project if that would assist you helping me.
    Attached Files

    #2
    You should take a look at RotateVector, as well as direction vectors (GetActorRightVector, etc.). Here is an example of how to trace 500 units to the right of your actor (Character, etc.):
    Click image for larger version

Name:	62b5009083.png
Views:	1
Size:	93.4 KB
ID:	1104890

    As for the 4 traces, just use 4 line trace nodes The same thing with tracing to the right applies to tracing forwards (GetActorForwardVector), backwards (GetActorForwardVector * -1), etc.
    Last edited by Jamendxman3; 04-19-2016, 06:06 PM.
    Marketplace Assets

    Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
    Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
    Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

    Comment


      #3

      I tried to replicate your node setup, and sometimes it does succeed to register all tracelines, but sometimes it won't even register anything. Any idea what the problem could be?

      Comment


        #4
        Originally posted by voltaqez View Post

        I tried to replicate your node setup, and sometimes it does succeed to register all tracelines, but sometimes it won't even register anything. Any idea what the problem could be?
        Ohhhh that looks like bomberman
        Im not too sure about this, but i could imagen that destroying the actor befor it has done the tracing causes some trouble (sometimes).
        I would start to set the destroying node at the end of all your traces / tasks.

        Comment


          #5
          Yes, indeed it is a sort of "Bomberman game". So you're saying the actor which is the bomb needs to destroy itself after it's done tracing?

          *UPDATE*

          Tried deleting the destroy node so the bomb doesn't destroy itself, still no difference but the linetraces seems to fail at the exact same positions everytime like in the video.
          Last edited by voltaqez; 04-20-2016, 10:36 AM.

          Comment


            #6
            Originally posted by voltaqez View Post
            Yes, indeed it is a sort of "Bomberman game". So you're saying the actor which is the bomb needs to destroy itself after it's done tracing?
            I might also miss something in your video but logicaly, what you do is:
            Say to your bomb deytroy yourself and after you have destroyed yourself do some traces. (I Suppose Event Destroyed is also empty?)
            It still might work out but its something you should test.

            Edit:
            You wont see a difference when destroying the actor after all the tasks, its too fast for us humans but for the computer, the object cant do anything when it stops exisiting.
            But in the end its just my guess, i dont know how long it takes to destroy the actor etc.
            Last edited by Urm92; 04-20-2016, 10:40 AM.

            Comment


              #7
              Bump.

              I changed the traces into multiboxtracebychannel instead of multilinetracebychannel, but the problem still occurs that the traces doesn't register properly and doesn't destroy the actor which is the cube. Does anyone have a clue on why this is happening and how to fix it.

              Comment


                #8
                But based on the video the traces hit just fine (you can see the hitmarks on the debug trace lines) you are probably doing something wrong with how you destroy the actors.

                4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
                WIP Interactive Water Shader, WIP 2D Water Sim
                WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

                Comment


                  #9
                  I tried out the bombs in the actual map, and it worked out perfectly except two things that i would love some help on!

                  Click image for larger version

Name:	wallsbomberman.png
Views:	1
Size:	566.3 KB
ID:	1104961

                  How would i be able to make the bombs spawn in the middle of the tile i'm standing on, and the last thing how do i make the walls block the multiboxlinetrace?
                  I appreciate all answers and i'm really grateful for the help i've received so far!

                  Comment

                  Working...
                  X