Guest User

Untitled

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