Snapping object to raycast hit in 1 local axis.

I’m trying to lock my player to the raycast hit, but only in one “local” direction.
I essentially want my player locked to the ground, while still allowing it to move left and right locally.
The ground rotates.

173665-help.png

You can get the hit.distance and move the object proportionally to this value, using the direction to the point as well.