MMeshIntersector::getClosestPoint function gets closest point between a pointlight and a mesh. How is it possible to get closest distance between 2 mesh objects.
EDIT
string $closestPoint = eval("createNode nearestPointOnMesh -n cpom1");
connectAttr -f pPlane1.worldMesh ($closestPoint + ".inMesh");
connectAttr -f pSphere1.translateX cpom1.inPositionX;
connectAttr -f pSphere1.translateY cpom1.inPositionY;
connectAttr -f pSphere1.translateZ cpom1.inPositionZ;
int $selectedFaces = getAttr cpom1.closestFaceIndex;
this is half the solution. presume a sphere at (0,6,0) - "freeze transformed",now (0,0,0). and plane at (0,0,0). how is it possible to snap sphere to plane on the face index gotten by the above code.
