So I’ve been at this for weeks. I want to create a rigidbody player that orients itself with the ground normal (orientationVector) and keeps its forward direction (directionVector). Of course, you would assume Quaternion.LookRotation(directionVector, orientationVector) would work, but it doesn’t. You get this:
Using the cross product of transform.right and orientationVector as the forward in the LookRotation gives you this:
…which doesn’t rotate the actual object transform and requires me to use transform.TransformDirection on directionVector before accelerating to curve movement around the sphere. This almost works, but as you can see above, the forward slowly starts to go out of line with the world forward, meaning right was more like down-right.
The last thing I’ve tried is finding the ‘transform.right’ of directionVector (multiplying by Quaternion.Euler (0, 90, 0) and using the cross product of the new “adjacentVector” and orientationVector in LookRotation. This gives you:
which is ALMOST it, but when on the front of the sphere, pressing right makes you spin clockwise around it, and left counter-clockwise. The attempt before this one at least let me move relative to the player, just slowly went out of alignment.
I should also mention that acceleration movement is just using transform.forward (or a transformed directionVector when using transform.TransformDirection).
I know this seems super intense, but I’d literally be willing to pay someone to get this problem out of my life ![]()
Anyone know how to get it working?