I’ve looked around in 3dsMax and googled for some while without finding the answere. Does anyone know if there’s something similar in 3dsmax as the Closest Point on Surface constraint in Maya?
I found this class “MeshProjIntersect”, it seemed to work, and was relatively quick. There was a similar class called “RayMeshGridIntersect” that didn’t work for me as expected.
s = sphere pos:(random [-100,-100,-100] [100,100,100]) radius:5.0
p = point pos:(random [-100,-100,-100] [100,100,100]) size:5.0 cross:true axisTripod:false box:false centermarker:false
m=MeshProjIntersect()
m.setnode s
m.build()
m.ClosestFace p.pos
ghf = m.GetHitFace()
ghd = m.getHitDist()
format "Closest face:[%] distance:[%]
" ghf ghd