Download

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. :smiley:
Don’t refrain to ask further questions about my project if that would assist you helping me.

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.):
ef5791298b73169f051121183d56ddd3688bfc63.png

As for the 4 traces, just use 4 line trace nodes :stuck_out_tongue: The same thing with tracing to the right applies to tracing forwards (GetActorForwardVector), backwards (GetActorForwardVector * -1), etc.

https://youtube.com/watch?v=h6Fjv350sug
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 :smiley:
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.

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.

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.

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.

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

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

wallsbomberman.png

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! :slight_smile: