# Finding out whether a point exist on a mesh

Is there any method to find out whether a point, lets say A, existed or not on a mesh, for example a plane mesh. I only need it to return a simple boolean ‘yes’ or ‘no’ for every query.

you might be looking for this?

This may help if you’re using Colliders

As the mesh that i use is a combined mesh, bounds does not seems to be a viable solution. Mesh collider may become expensive, as the mesh will grow at each update. As for mesh vertices, I am not sure how to use that method, as the point A, may not be on the vertex. The picture below depicts how my mesh would be.

Check something like PointInsidePolygon
http://wiki.unity3d.com/index.php/PolyContainsPoint

Other ideas

• maybe you could just check for pixel color on that position…
• if they are always drawn as circles, keep list of circles and check if point is inside any circle radius (and could only check nearby circles, not all if there are too many)

I will check on your link. Yes the combined mesh are comprised of circles. Regarding your other ideas:

• the mesh may not be rendered as it increased the VRAM usage. Correct me if I’m wrong, the mesh and its transform matrix would still be the same even though it is not rendered, right?
• I also thought of that, but that list will grow by time and it will not particularly grow in one direction only, the direction may become random. How do you propose to check a certain few of them?

Thanks for your reply. If no other ideas comes up, I will proceed with the list method.

Circle checking,
Actually only need to store x,y, if radius is always the same and then only compare with closest circle.
(using some KDTree or such if you have many circle positions,
or even basic grid (if point is in grid cell A,B then only compare circles that are also in that or next cell, depending on the sizes)