I need this script to work so the player can walk around a sphere like it’s a plane, except the rotation is a bit off how the player rotates very quickly once it gets to a certain value.
var speed : float = 4;
var rotateSpeed : float = 4;
var gravityPoint : Transform;
var forwardPoint : Transform;
var rot : float = 0;
var axisSpeed : float;
function FixedUpdate () {
var rotq = Quaternion.LookRotation(gravityPoint.position-transform.position);
transform.rotation = Quaternion.Slerp(transform.rotation,rotq,10f*Time.deltaTime);
rigidbody.velocity = (forwardPoint.forward*speed*Input.GetAxis("Vertical"));
axisSpeed = speed*Input.GetAxis("Horizontal")*rotateSpeed*Time.deltaTime;
rot+=axisSpeed;
transform.localRotation.eulerAngles.z = rot;
}