How to correctly project a Mouse onto a Mesh in 3d space?

How to correctly project a mouse onto a mesh in 3d space?
in Kangaroo it works correctly.


MouseTracker.gh (13.3 KB)

how can this be repeated in C#? :face_with_monocle:

https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/7/f/7f5c611dcef03df412378dc5124e534bd4cd8bcd.gh