轮胎在滚动方向上的滑移。加速滑移为负,制动滑移为正。
using UnityEngine;
public class Example : MonoBehaviour { // Prints "braking slip!" when tire slips badly. void FixedUpdate() { WheelHit hit = new WheelHit(); WheelCollider wheel = GetComponent<WheelCollider>(); if (wheel.GetGroundHit(out hit)) { if (hit.forwardSlip > 0.5) print("braking slip!"); } } }