How to Line Trace in all directions?

How can I do a line trace outwards from a characters head in all directions creating a perfect sphere of line traces? Please show with blueprint example and explain like I’m 5, thank you!


All directions is a vague notion, because all directions is infinite directions.
What exactly are you trying to achieve?


I want a sphere of line traces emanating outward from a point (not a sphere trace)

That’s understandable; I meant what’s the purpose of these traces?
You can do some math and shoot a bunch of traces with some angle increment, but that’s going to be really expensive performance-wise, and quite inefficient at long ranges.
Are you sure a multi-sphere trace or simply a sphere collision won’t do the job?


Can you show what a blueprint doing that would look like please?

I think he is asking precisely about multi-sphere trace

1 Like

if you want to detect anything within a sphere around an actor, why not use a sphere collider?


Ive already seen that video, and no thats not what I am trying to do. I just want to be able to fire line traces in a sphere formation outward thats all

It is possible, but your frame rate will tank very badly…


I’m willing to take that risk, can you do it?

Well, he wants to throw traces, if he asked how to detect actors, the sphere could be a better option. That it’s bad for the performance is not my problem, hahaha.
Although the trace give a lot of information about what they hit if you want to look at your surroundings including static objects.

This post

shows you how to place N points evenly spaced on the surface of a sphere. You can adapt this code to make your traces.

1 Like

here is a way of doing what you want to achieve.
I don’t know what is you goal with this but trace a lot of lines in a sphere to detect stuff around is a very inefficient way to do it. I we have a closer knowledge about what you trying to achieve maybe we can help you with a better approach of what you need.

I am not good with kids so I cant explain it as you were a 5yo sorry

Good Luck!


GR = 1.618




Those things are sharp…


Well hot dam! You really are a hero, the friendly Cyberhood UnrealMan. I miss the old answer hub, and your name on the weekly scoreboard :stuck_out_tongue:

Now that I’ve buttered you up, three things (please):

  1. what does the “GR=1.618” mean, if you could please explain

  2. How to increase the Resolution of the traces, meaning more traces to make a more dense sphere (of traces)

  3. The following is a great tutorial on what I am (roughly) trying to do, how to create a line of sight effect, but this tutorial is in 2D XY plane only.
    It does not account for elevation/height, thus I need a modified “3D Line of Sight XYZ plane” system, so that the shadows/dark areas are instinctively appropriate:

Hence, the 720 spherical trace :smirk:
In the tutorial above he uses a Single Triangle as a 1 degree “Slice” for the Procedural Mesh in a 360 degree, XY 2D-Plane only
(you can download it and see what I am talking about).
So my question is, how would you convert that to a 3D XYZ version?
My thought was to convert the single flat triangle mesh he provides :small_red_triangle_down: into a 3 sided pyramid.
And then use that in the spherical line trace we have established,
to create the (red/black) antimask or whatever, but as 3D/2.5D?
How does that sound?

Please consider the following use case carefully as the test bench environment:
(How/where would the appropriate shadow/dark areas be vs light areas, from the characters perspective, not the cameras.
Thus giving the player, a sense of immersion from a distance).
Hope that makes sense, and thank you
(click gyazo link for bigger version)

The little hatch in the ceiling will be visible upon looking up,
but you will have to climb up for the next floor to become visible


1)- The walls/ceilings/floors in the way of the camera will be occlusion masked away during runtime
(along with the specific 3D Line of Sight areas visible to the character,
for example through the door on the left which would make the roof cull/mask out in the specific conical sight shape leaking into the room.

2)- The door on the top right should be in shadow/dark but the wall/roof/hatch above it should be visible according to angle of player character
(in the use case example environment above):

Addendum: Some links that maybe useful:

  1. This is GR


  1. For more traces, just change N


Reading the rest… This is a 3D version of what you have in Gyazo link.

Y’all are awesome! I just rolled this into a snippet:

It’s things like this that make the forums a great place to be. :beers:


So I created an actor blueprint and followed exactly but nothing happened.
The actor doesn’t show any traces, what are the values for the Theta, Phi, Zoffset, and LenghtOfTrace? What am I missing here?