Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class scrolling : MonoBehaviour
- {
- public float speeds = 0.055f;
- void FixedUpdate(){
- Vector3 dpkm = new Vector3 ();
- if (Input.GetKey (KeyCode.Q)) {
- dpkm.x -= speeds;
- }
- if (Input.GetKey (KeyCode.D)) {
- dpkm.x += speeds;
- }
- transform.position += dpkm;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement