using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class player : MonoBehaviour
{
public float movespeed;
float XInput,YInput;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void FixedUpdate()
{
XInput = Input.GetAxis("Horizontal");
YInput = Input.GetAxis("Vertical");
transform.Translate(XInput * movespeed, YInput * movespeed,0);
}
}
No comments:
Post a Comment