using System.Collections;
using UnityEngine;
public class SimpleWalker : MonoBehaviour
{
private CharacterController characterController;
public float speed = 5f;
void Start()
{
characterController = GetComponent<CharacterController>();
}
void Update()
{
float horizontal = Input.GetAxis("Horizontal");
float vertical = Input.GetAxis("Vertical");
Vector3 direction = new Vector3(horizontal, 0f, vertical).normalized;
Vector3 move = direction * speed * Time.deltaTime;
characterController.Move(move);
}
}