0
我有簡單的3D車,其中有輪colliders
。現在我用下面寫好的劇本給他們分配colliders
但是當我跑我的遊戲沒有任何反應WheelCollider不工作使用Unity 5
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
通過統一檢查連接
是它不轉動或不動呢? – trahane
當我跑他們穿過地形對撞機或飛向上 –
我認爲你的軸可能混淆了......你想要移動什麼軸? – trahane