I’m trying to do a AoE damage in BP so I decided to used a MultiSpereTrace to know all actors that will be impacted by the AoE.
As of now, I can’t get it work. It always return an empty array.
For the line parameter I set the End = Start as I just want to test it from 1 point and not a line.
ok first off lets start with are you tracing by channel or objects?
Then the next part will go over is the start and end. Thing of the toy that had all the nails in it that you could make an impression of your hand. each nail starts at one point then pushes to another when you put your hand on to it.
example no traces
on the left and then traces on the right.
So if you set the start and the end point the same you would basically always have the left since now the pins cant move or to be precise they have no LENGTH.
Now lets look at the two nodes
So you have
- Start - From where you want to trace (relative to world of where the actor is recommend use GetActorLocation)
- End - To how far out you want your trace to go out to or where you want to trace to if a specific point
- Radius Degrees - in front(facing) of view should set this to 360 if not sure
- Object Types - What types are you trying to look for with the trace (pawn, walls, etc etc)
- Trace Complex - Needed for complex collision meshes
- Actors to Ignore - If say this was a monster you don’t want it to find others like itself
- Draw Debug Type - You should use this to start so you can visually see what it does as it will draw the traces
- Ignore Self - As it sounds if it was a big dragon and the traces were able to hit its legs they would not show the hits
- Out Hits - Is the array of what is hit. This is what you want to pull from to see what got inside the blast radius
- Return Value - Was anything hit?
hope this helps to better explain how it works. If you are still having issues with setup post up a screen shot of your blueprint and anything else to show the problems and I’ll try to help you get it sorted.
Thanks for the information.
In fact, I think I understand the Start/end & Radius usage by seing the debug sphere (very useful :D)
Now my problem, is that Actor that are behind a blocking volume (like a wall) are taken into account in this Sphere Trace;
How should I do to have only actor that are visible to the user (like a WeaponTrace).
OK, I know this is an old post but it came up high on a google search and it has some misinformation that should be rectified. (May have been correct at the time of posting, but is no longer correct at any rate.)
- Start and End points can be the same, it will make a single sphere to be traced instead of a line of spheres. Note that you MAY still need to add a small displacement in any single direction in recent engine vsns.
- Radius is not the degrees of circle to trace, it’s the length of the sphere’s radius. Each sphere will have the radius set here.
And as reference, if anyone is having the question that Elvince asked in his comment - you could try doing a line trace from the source of damage to the location of the actor that it’s trying to hit and check for anything in between them.
Also, I am using it with exactly one object in the area to trace and I am getting 8 hits for the same object back. Something is wrong with this function (UE 4.20.3). No idea what it is yet.