Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class CharacterMovement : MonoBehaviour {
- public float moveSpeed = 10f;
- void Update () {
- Vector3 movement = new Vector3();
- movement.x = Input.GetAxis("Horizontal");
- movement.z = Input.GetAxis("Vertical");
- this.transform.Translate(movement * moveSpeed * Time.deltaTime);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement