Maybe I was asking wrong. How do I stop my tank from climbing walls??

I’m at a loss. How do I stop my tank from climbing walls and going all wonky. I was it to hit a wall and stop. My full controller is here. The relevant bits are below.

```
void FixedUpdate () {
if (!isServer) {
return;
}
CheckGrounded ();
Hoover ();
if (_moveForward) {
float moveAmount = moveSpeed * Time.deltaTime;
_rigidbody.MovePosition (_rigidbody.position + _rigidbody.transform.forward * moveAmount);
}
if (_moveBackward) {
float moveAmount = (-moveSpeed * 0.6f) * Time.deltaTime;
_rigidbody.MovePosition (_rigidbody.position + _rigidbody.transform.forward * moveAmount);
}
if (_turnLeft) {
Quaternion rotateAmount = Quaternion.Euler (new Vector3 (0f, -angularSpeed, 0f) * Time.deltaTime);
_rigidbody.MoveRotation (_rigidbody.rotation * rotateAmount);
}
if (_turnRight) {
Quaternion rotateAmount = Quaternion.Euler (new Vector3 (0f, angularSpeed, 0f) * Time.deltaTime);
_rigidbody.MoveRotation (_rigidbody.rotation * rotateAmount);
}
if (_jump && _isGrounded) {
_isJumping = true;
}
if (_isJumping && _jumpTimeLeft > 0) {
float moveAmount = jumpSpeed * Time.deltaTime;
_rigidbody.MovePosition (_rigidbody.position + _rigidbody.transform.up * moveAmount);
_jumpTimeLeft -= Time.deltaTime;
} else if (_isJumping) {
_isJumping = false;
_jumpTimeLeft = jumpTime;
}
}
void Update() {
// Keep things level
if (q.x - transform.rotation.x > maxTilt) {
transform.rotation = new Quaternion (q.x + maxTilt, transform.rotation.y, transform.rotation.z, transform.rotation.w);
}
if (q.x - transform.rotation.x < -maxTilt) {
transform.rotation = new Quaternion (q.x - maxTilt, transform.rotation.y, transform.rotation.z, transform.rotation.w);
}
if (q.z - transform.rotation.z > maxTilt) {
transform.rotation = new Quaternion (transform.rotation.x, transform.rotation.y, q.z + maxTilt, transform.rotation.w);
}
if (q.z - transform.rotation.z < -maxTilt) {
transform.rotation = new Quaternion (transform.rotation.x, transform.rotation.y, q.z - maxTilt, transform.rotation.w);
}
}
void CheckGrounded() {
Ray ray = new Ray(centerPoint.position, -centerPoint.up);
RaycastHit hitInfo;
if (Physics.Raycast(ray, out hitInfo, groundedThreshold, _groundLayer)) {
_isGrounded = true;
} else {
_isGrounded = false;
}
}
void Hoover() {
foreach (Transform hoverPoint in hooverPoints) {
_rigidbody.AddForceAtPosition (-hoverPoint.up * hooverForce / 10, hoverPoint.position, ForceMode.Force);
Ray ray = new Ray (hoverPoint.position, -hoverPoint.up);
RaycastHit hitInfo;
if (Physics.Raycast (ray, out hitInfo, hooverHeight)) {
float distance = Vector3.Distance (hoverPoint.position, hitInfo.point);
if (distance < hooverHeight) {
_rigidbody.AddForceAtPosition (hoverPoint.up * hooverForce * (1f - distance / hooverHeight), hoverPoint.position, ForceMode.Force);
}
}
}
}
```