float antiRollForceValue = (travelL - travelR) * antiRollBarForce; if (groundedL) rb.AddForceAtPosition(frontLeftWheel.transform.up * -antiRollForceValue, frontLeftWheel.transform.position); if (groundedR) rb.AddForceAtPosition(frontRightWheel.transform.up * antiRollForceValue, frontRightWheel.transform.position);
void ApplyAntiRoll()
Vector3 pos; Quaternion rot; collider.GetWorldPose(out pos, out rot); visualWheel.position = pos; visualWheel.rotation = rot; realistic car driving script
[Header("Suspension & Stability")] public float antiRollBarForce = 5000f; void ApplyAntiRoll() Vector3 pos