private void ThrottleMovement()
{
// general speed half or double general speed + 25% of general speed == Always a positive value
float speedMod = (throttle * generalSpeed) /*+ (generalSpeed/4)*/;
if (throttle < 0)
{
// Slow down when trying to reverse
speedMod *= reverseSpeedMult;
}
// Slow down when laden
speedMod *= CalcHandlingMassMult();
// Slow down when mast is gone
float tempNotUsed = 0.0f;
float mastSpeedMult = 0.0f;
//GetPartInputMults(ShipPartDestroy.EShipPartType.MAST, out mastSpeedMult, out tempNotUsed);
speedMod *= (1.0f - mastSpeedMult);
m_myRigid.AddRelativeForce(Vector3.forward * speedMod, ForceMode.Acceleration);
// This finds the moving 'up' vector. It was a cool trick from The Standard Vehicle Assets
var liftDirection = Vector3.Cross(m_myRigid.velocity, m_trans.right).normalized;
m_myRigid.AddForce(liftDirection);
}