0
#pragma strict
private Rigidbody rb;
function Start() {
rb = GetComponent<Rigidbody>();
}
function FixedUpdate() {
var v : float = Input.GetAxis("Vertical");
var h : float = Input.GetAxis("Horizontal");
Vector3 movement = new Vector3 (h, 0.0f, v);
rb.AddForce (movement);
}
私にはいくつかのコードを表示していただきありがとうございます。お返事いただきありがとうございます。Unity javascriptのエラーリジッドボディ
エラーは何ですか? – Programmer
Assets/Scripts/PlayerController.js(3,10):BCE0043:予期しないトークン:リジッドボディ。 –
ohh。これはAssets/Scripts/PlayerController.js(13,16)です:UCE0001: ';'期待される。最後にセミコロンを挿入します。あなたはv) –