Hello everyone,
I am trying to know when the point of my Getpoint() is not on the mesh i used Constrain on.
The only output from Constrain is true but i need to know when the point is not Constrained.
Am i missing something ?
Hello everyone,
I am trying to know when the point of my Getpoint() is not on the mesh i used Constrain on.
The only output from Constrain is true but i need to know when the point is not Constrained.
Am i missing something ?
Hi @Yves_Gobinet,
If want to constrain point picking to a mesh, then make sure to set the allowPickingPointOffObject to false.
var gp = new GetPoint()
gp.Constrain(mesh, false);
// ...
Also, you can verify the picked point is on the mesh using Mesh.ClosestPoint.
var mesh_point = mesh.ClosestPoint(picked_point);
if (mesh_point.DistanceTo(picked_point) < my_tolerance)
{
// ...
}
– Dale