You're passing in the wrong matrix.  You don't want the inverse you just 
want the inclusive matrix :
 

mat = meshPath.inclusiveMatrix()
resultPoint = om.MPoint()
polyIntersect = om.MMeshIntersector()
polyIntersect.create(shape, mat)
ptON = om.MPointOnMesh()
polyIntersect.getClosestPoint(pt, ptON);
resultPoint = om.MPoint(ptON.getPoint().x, ptON.getPoint().y, ptON.getPoint().z)


On Thursday, December 4, 2014 12:56:20 PM UTC-8, illunara wrote:
>
> Hi Chad
> I attach the code using MMeshIntersector in the first post, but the result 
> gone wrong :( 
> can you take a quick look at it please?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/68f88735-8cb6-44db-8655-f93d7aff80a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to