private void ExertForce() { _currentThrust = thrustPercent * maxThrust * 1000f; // to return the value in Newtons we multiply by 1000 var thrustVector = thrustUnitVector.normalized * _currentThrust; _physicsController.AddForce(thrustVector); }
private void FixedUpdate() { var velocityVector = _physicsController.Velocity; var speed = velocityVector.magnitude; var dragVector = CalculateDrag(speed) * -velocityVector.normalized; _physicsController.AddForce(dragVector); }