I'm wondering how I would move the tk2dcamera with input, I was trying this code below but it doesn't seem to work.
using UnityEngine;
using System.Collections;
public class GameScript : MonoBehaviour {
public tk2dCamera Cam;
public float moveX;
// Use this for initialization
void Start () {
Debug.Log("HERET");
moveX = 0;
}
// Update is called once per frame
void Update () {
if(Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.D))
{
Debug.Log("HERE");
moveX += 20;
//Cam.viewportRegion = new Vector4(moveX, 0, 100, 100);
//Camera.current.transform.Translate(new Vector3(moveX, 0, 100));
}
}
}
I'm not sure what to do to make it to work. Anyone got ideas?