Search Unity

Getting an exact array of vectors from a mesh

Discussion in 'Editor & General Support' started by Draconic, Sep 18, 2014.

  1. Draconic

    Draconic

    Joined:
    Oct 12, 2013
    Posts:
    82
    Is there a way/function to create an array of vertices on a mesh? I would like to use PolyContainsPoint to detect if points around the player are inside of a polygon.

    http://wiki.unity3d.com/index.php?title=PolyContainsPoint

    For this function I would need an array of Vector2s created from the vertices of a mesh.
    Is there a way to do this?