Project curve to mesh not working as intended

Hi Rhino gurus,

I’m trying to project some curves onto a mesh and the resulted curves have a slight shift. Please see image below. The yellow line is the original curve and the red line is the projected curve onto the mesh. The mesh is a terrain. I have tried setting the curve projection direction to View and Z-cplane and even try rebuidling the curves to have move vertices but nothing seems to work.

Anyone know how to resolve this issue? Thanks in advance.

I have figured out the cause of the issue. My terrain was on a real world coordinate system with very large X,Y,Z values and that was causing the glitching error during the projection. So i moved my terrain to the origin (0,0,0) to perform the curve projection and that fixed the issue.