I am trying to have a ball’s up axis match the rotation of the normal of the ground it sits on. I’ve used a number of different systems, but the most clean why seems to be to use down.rotation = Quaternion.LookRotation( ___ , hit.normal);
the problem is the forward, I want my object to point the same forward as before. so i tried using down.forward, but that just gives me some weird stuff. I can use:
var temp = down.rotation.y;
down.rotation = Quaternion.LookRotation(Vector3.forward, hit.normal);
down.rotation.y = temp;
but I’d rather something a little cleaner. Anyone know how to fix it?