I want to find the face intersected with the ray of positive X axis of an object, But the parameter “dir” of ClosestFace function doesn’t work as expected and near face at any direction will return.
delete objects
Obj = point wirecolor:yellow \
centermarker:off axistripod:on cross:off box:off constantscreensize:off drawontop:off
Target = box pos:[0,0,-10] height:50 width:200 length:20 wirecolor:blue
TheRay = MeshProjIntersect()
TheRay.setNode Target
TheRay.build()
TheRay.ClosestFace Obj.center dir:[1,0,0] doubleSided:true
HitPos = TheRay.getHitPos()
point pos:HitPos wirecolor:green \
centermarker:off axistripod:off cross:on box:off constantscreensize:off drawontop:off
Any idea?