Hover ship help

I am trying to creat a hover ship and I have the following script but when I go over a ramp or anything it just falls strait off and bounces all over the place. Plz help me I got the start of the code here>

var driveForce: float;

var hoverHeight: float;
var thrustForce: float;
var steerForce: float;
var steerPosZ: float;
var damping: float;

var thrusters: Vector3[];




function FixedUpdate () {
	var hit: RaycastHit;
	
	for (i = 0; i < thrusters.Length; i++) {
		var wdThruster: Vector3 = transform.TransformPoint(thrusters*);*
  •  if (Physics.Raycast(wdThruster, -transform.up, hit)) {*
    
  •  	var discrep: float = hoverHeight - hit.distance;*
    
  •  	var upVel: float = rigidbody.GetRelativePointVelocity(wdThruster).y;*
    

_ rigidbody.AddForceAtPosition(transform.up * (thrustForce * discrep - upVel * damping), wdThruster);_

  •  }*
    
  • }*

  • var fwd: float = Input.GetAxis(“Vertical”);*
    _ rigidbody.AddForce(transform.forward * (driveForce * fwd));_

  • var steer: float = -Input.GetAxis(“Horizontal”);*
    _ rigidbody.AddForceAtPosition(transform.right * (steerForce * steer), transform.TransformPoint(Vector3.forward * steerPosZ));_
    }

function OnDrawGizmos() {

  • for (i = 0; i < thrusters.Length; i++) {*
    _ Gizmos.DrawWireSphere(transform.TransformPoint(thrusters*), 0.1);_
    _
    }_
    _
    }*_

Well I’m not a major fan of the raycast myself … what I would suggest I do not have code just a theory to start on is instead of raycast check either another object with a box collide r on bottom of hovercraft … that would be a invisible space to " FLOAT ON "
Just have the box collider scale on on collision to shrink the box then expand back out over time giving the bouncing effect :slight_smile: or even scale the collider based upon velocity derived by _ _ . Hoped that helps.