初めてunityとC#を触る初心者です。移動量を取得して移動している場合はキャラクターを動かすというプログラムを作ったのですがエラーが発生してbuildできません。
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerContller : MonoBehaviour { public float movespeed = 10; CharacterController characterController; void Start () { characterController = GetComponent<characterController> (); } void Update () { Vector3 direction = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")) if (direction.sqrMagnitude > 0.01f)//←このifにunexpected symbol {//←このかっこにunexpected symbol characterController.Move(direction * movespeed * Time.deltaTime); } } }//←このかっこにunexpected symbol
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/08 08:37 編集