- Home /
Question by
gonzalitosk8 · Sep 20, 2019 at 11:20 PM ·
instantiatereferencehitareainside
instantiate gameobjects into area
How can I achieve this?
I have a list of vector3 that are benchmarks. I would like to instantiate an object within the area between points, as the image shows. the idea is to do it without using colliders
ref.png
(9.4 kB)
Comment
Answer by sacredgeometry · Sep 21, 2019 at 03:11 PM
As mentioned in the source link below. You can triangulate the polygon you are specifying with the reference points then you can use triangle point picking to add the point to those triangles.
References
http://mathworld.wolfram.com/TrianglePointPicking.html https://en.wikipedia.org/wiki/Polygon_triangulation
Source
https://gis.stackexchange.com/questions/6412/generate-points-that-lie-inside-polygon