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 movement : MonoBehaviour {
- float width = 8;
- float height = 4;
- void Update () {
- Vector3 controllerVector = new Vector3(Input.GetAxis("Horizontal") * (width / 2), Input.GetAxis("Vertical") * (height / 2), 0);
- transform.position = controllerVector;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement