- Home /

# Find Most Distant Geometric Points in the Scene

Hi,

How would I be able to find the most distant geometric points in the scene? What I mean, is lets say there's a 1x1x1 cube in the scene with the center at the origin (0,0,0), then the "most distant geometric points" or the vertices which are furthest away from the origin would be (0.5,0,0), (0.5,0.5,0), (0.5,0.5,0.5), (0.5,0.5,-0.5) etc.

Sorry, I don't really know how to explain what I mean any better, but I hope someone can stumble upon this and answer my question. Any help would be much appreciated.

**Answer** by jt78
·
Nov 16, 2013 at 01:15 PM

If I'm understanding correctly, you want to find the position of the furthest vertex from the origin? An easy (but not that efficient) way to do this would be to loop through the `mesh.vertices`

array and use `Vector3.Distance`

(or `Vector3.magnitude`

) to find the one that is furthest away. If you want this to find the most distant point in the whole scene then you'd need to repeat that for every mesh in the scene.

You could also make a much faster approximation using the `Bounds`

class

Hope that helps, more clarity in the question would be useful though

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.

### Follow this Question

### Related Questions

How can I find the position between Point A and Point B, X units away from Point A? 1 Answer

Floating point accuracy weirdness 4 Answers

RayCast Hit Point rounding itself...? 1 Answer

Why in Unity is no separate Point and Vector class ? 1 Answer

Elevator Motion Going Up Smooth, Going Down Not Smooth 1 Answer