Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // -- Finally we apply this rotation around a point between the cars front wheels.
- transform.RotateAround( transform.TransformPoint( ( frontWheels[0].localPosition + frontWheels[1].localPosition) * 0.5),
- transform.up,
- rigidbody.velocity.magnitude * Mathf.Clamp01(1 - rigidbody.velocity.magnitude / topSpeed) * rotationDirection * Time.deltaTime * 2);
- }
Add Comment
Please, Sign In to add comment