Vector3に色がつかなくて、再生ボタンを押すと本来する動作をしません。
using UnityEngine; using System.Collections; public class PlayerController : MonoBehaviour { void FixedUpdate (){ float movehorizontal = Input.GetAxis ("Horizontal"); float movevertical= Input.GetAxis ("Vertical"); Vector3 movement = new Vector3 (movehorizontal, 0.0f, movevertical); GetComponent<Rigidbody>().velocity = movement; } }
というコードを書いたのですが、どこが間違っているのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。