Quantcast
Viewing latest article 9
Browse Latest Browse All 28

Answer by TheCatProblem

The centre of a group of points at arbitrary locations in 2D or 3D space is usually referred to as the [centroid][1]. This is computed by averaging the location of the points in each coordinate (x, y, and z). Assuming you have `N` points (4 in your case) stored as `Vector3`s, just add them all together (vectors are added component-wise in Unity, as they should be) and divide the result by `N` to obtain the coordinates of the centroid point. [1]: http://en.wikipedia.org/wiki/Centroid

Viewing latest article 9
Browse Latest Browse All 28

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>