以下是我的当前代码: using UnityEngine; using System.Collections;
public class Position : MonoBehaviour {
public WheelCollider wc;
public Transform tf;
// Use this for initialization
void Start () {
wc = GetComponent<WheelCollider> ();
tf = GetComponent<Transform> ();
}
// Update is called once per frame
void Update () {
transform.position = new Vector3 (tf.transform.position.x + (wc.suspensionDistance * 100), tf.transform.position.y);
我不知道如何使它工作,请帮忙!