When my player is in the air or on the ground, I’d like the player to follow the normals of the floor but smoothly, At the moment it is snapping to the normals and I cant seem to figure out how to implement hit.normal with Quaternion.Lerp.
var AirHit : RaycastHit;
if (Physics.Raycast(transform.position, Vector3.down, AirHit)) {
SnowMesh.transform.rotation = Quaternion.Lerp(transform.rotation, AirHit.normal, 10 * Time.deltaTime);
}
var airheight = AirHit.distance;
playerHeight = AirHit.distance;
}