1

我有简单的 3D 汽车,它有轮子colliders。现在我正在使用下面的书面脚本并分配它们colliders但是当我运行我的游戏时没有任何反应

using UnityEngine;
using System.Collections;

public class CarMoves : MonoBehaviour {

    public WheelCollider wheelFL;
    public WheelCollider wheelFR;
    public WheelCollider wheelBL;
    public WheelCollider wheelBR;
    float Maxtorque = 50;

    // Use this for initialization
    void Start () {

    }

    // Update is called once per frame
    void FixedUpdate () {
        wheelBR.motorTorque = Maxtorque * Input.GetAxis("Vertical");
        wheelBL.motorTorque = Maxtorque * Input.GetAxis("Vertical");
        wheelFL.steerAngle = 10 * Input.GetAxis("Horizontal");
        wheelFR.steerAngle = 10 * Input.GetAxis("Horizontal");

    }

}

所有这些公众colliders都是通过统一检查员连接的

4

1 回答 1

0

确保汽车底座上的刚体质量至少为 1000kg。

车轮对撞机的悬架弹簧也达到 12000+,阻尼器达到大约 2000

于 2016-08-25T14:15:57.530 回答