void ApplySteering(Vector3 relativeVelocity) { if (canSteer) { float turnRadius = 3.0f / Mathf.Sin((90 - (steer * 30)) * Mathf.Deg2Rad); if (throttle < 0) { turnRadius *= -1; } float minMaxTurn = Utilitys.EvaluateSpeedToTurn(carRigidbody.velocity.magnitude, maxSpeed, minimumTurn, maximumTurn); float turnSpeed = Mathf.Clamp(relativeVelocity.z / turnRadius, -minMaxTurn / 10, minMaxTurn / 10); carTransform.RotateAround(carTransform.position + carTransform.right * turnRadius * steer, carTransform.up, turnSpeed * Mathf.Rad2Deg * Time.deltaTime * steer); } }