ThirdPersonな移動

「ThirdPersonな移動」の編集履歴(バックアップ)一覧はこちら

ThirdPersonな移動 - (2015/04/01 (水) 23:33:01) の1つ前との変更点

追加された行は緑色になります。

削除された行は赤色になります。

-ラジコン的移動 左右キーで、その方向にY軸回転 if(Input.GetAxis("Horizontal") != 0){   transform.Rotate(0 , 100 * Time.deltaTime * Input.GetAxis("Horizontal") , 0); } 上下キーで、Z軸方向のベクトルを作り、 そのベクトルを、local→world変換して、thisを動かす if(Input.GetAxis("Vertical") != 0){   var varticalMove = Input.GetAxis("Vertical");   direction = new Vector3(0 , 0 , varticalMove);   direction = transform.TransformDirection(direction);   direction *= speed;   playerController.Move( direction * Time.deltaTime ); } -通常のゲーム的移動 transform.Translate(Input.GetAxis("Horizontal")*speed,0,Input.GetAxis("Vertical")*speed);
-ラジコン的移動 左右キーで、その方向にY軸回転 if(Input.GetAxis("Horizontal") != 0){   transform.Rotate(0 , 100 * Time.deltaTime * Input.GetAxis("Horizontal") , 0); } 上下キーで、Z軸方向のベクトルを作り、 そのベクトルを、local→world変換して、thisを動かす if(Input.GetAxis("Vertical") != 0){   var varticalMove = Input.GetAxis("Vertical");   direction = new Vector3(0 , 0 , varticalMove);   direction = transform.TransformDirection(direction);   direction *= speed;   playerController.Move( direction * Time.deltaTime ); } -通常のゲーム的移動 transform.Translate(Input.GetAxis("Horizontal")*speed,0,Input.GetAxis("Vertical")*speed);

表示オプション

横に並べて表示:
変化行の前後のみ表示: