I don’t know how correctly leave out the y factor in this code concept
if(Physics.Raycast(raydown, hit, RayDist , 1<<9))
transform.rotation =
Quaternion.FromToRotation(Vector3.up, hit.normal);
the code itself correctly aligns the object with the ground’s normal, but restricts the object to always to look forward on its y, which blocks my ability to turn or steer with keyboard commands. Is there a way to leave the y rotation out of this equation? Thank you