스크립트 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Moving : MonoBehaviour { public float speed; void Update() { transform.Translate(Input.GetAxis("Horizontal")*Time.deltaTime*speed, Input.GetAxis("Vertical") * Time.deltaTime*speed, 0); } }
스크립트
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Moving : MonoBehaviour
{
public float speed;
void Update()
{
transform.Translate(Input.GetAxis("Horizontal")*Time.deltaTime*speed, Input.GetAxis("Vertical") * Time.deltaTime*speed, 0);
}
}