教程都是Unity4.x的 5版本不适用
public var thrust: float; public var rb: Rigidbody; function Start() { rb = GetComponent.<Rigidbody>(); } function FixedUpdate() { if(Input.GetMouseButtonDown(0)) rb.AddForce(transform.up * thrust); }
教程都是Unity4.x的 5版本不适用
public var thrust: float; public var rb: Rigidbody; function Start() { rb = GetComponent.<Rigidbody>(); } function FixedUpdate() { if(Input.GetMouseButtonDown(0)) rb.AddForce(transform.up * thrust); }