Line Trace 360 around mesh

Like the title says, I would like to line trace 360 degrees around a mesh.

I am sorry for any confusion this might cause you, but I have rewritten this question a lot of times now and I think I have made myself more and more confused for each passing minute.

I basically have a mesh that looks like a crocked pipe, and it is laying on/along the y axis. What I want to do is to get a point as close to the middle of this mesh. To do this, I am using the mesh Component Bounds Box (red in the picture) and Sphere (yellow in the picture) to then get a Line Trace start and a end points (green points, 4 pairs of points). With these points I am later on doing a back and forth line trace where I then use the Hit Points on the mesh to calculate the pair with the longest hit point distance. Then I get the point in the middle of those two hit points. This point is supposed to be the middle of the mesh.

But as you probably already have guessed, this will not always give me an accurate answerer for where the middle point might be placed. If my brain is working correctly right now, I guess my problem would be solved if I did more Line Traces - almost like a 360 around the mesh.

Is there anyone out there that might know what I need to do or have a suggestion on what I can try?

Is there even anyone out there that understands my brain right now? because I think I fried it.

Looks so advanced to me. :slight_smile:
I totally don’t understand.
To get center point I always just set the mesh pivot to where I like.
And for the surrounding trace I would use sphere trace.

I am using the “Get Component Bounds Origin” to get a point in the middle of the component Bounds, because I am not supposed to change the pivot in any way in this project.

You are mentioning Sphere Trace, does that trace from outside in or inside out?

The sphere trace is like the sphere collision component.
You can use it for scanning a spherical range.
Anything gets inside will give you his information.

Like the tower defense games.
Towers always do a sphere trace to scan the surrounding enemys.
But I’m not sure if that’s what you want.

Thank you, but no that’s not really what I want.

I kind of want like a hula-hoop with an amount of given points on it which will do a line trace to find exactly where inside the hula-hoop the mesh and its middle point is placed.

I did a simple hula-loop.
It’s kind of sucks.
But hope it could help a little.




Could you clarify what the middle of the mesh would be for this 3d mesh:

Sorry for the confusion. By The Middle of the mesh I mean a point that’s in the middle if you saw the mesh apart for example at every EdgeSlice.

Thank you for taking you time to answer, but that is not what I am looking for.

Line Trace 360 around mesh

It’s just this:

X marks the spot:

This might be useless, really depends on what you need it for.


The built-in modelling tools allow you to find mesh centre to pivot around automagically, for example.

2 Likes

This works amazingly! Thank you so much :smiley:

If I want the Line trace to rotate along the y axis, is this how I should do it then? Because that doesn’t work, there is no line traces visible (the trace is visible when I change the values to be on Z).

Either X or Z, not Y, and not both.

image


You could get cheeky and add a plane (flag it as Hidden in Game):

And then try:

It’s easier to visualise the slice this way. Not sure if helpful but this way you do not need to punch in the values manually. Just rotate the plane.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.