c# - Translate camera to rotate left ('Q') and right ('E') -
i'm trying translate camera when press q , e want example when press 'q' camera translate left , let me give movement camera rotation, that tried this: public class cameramove : monobehaviour { public gameobject player; //public variable store reference player game object private float movespeed; private vector3 offset; //private variable store offset distance between player , camera // use initialization void start () { //calculate , store offset value getting distance between player's position , camera's position. offset = transform.position - player.transform.position; } void update(){ if (input.getkey (keycode.q)) transform.position += vector3.up * movespeed * time.deltatime; else if (input.getkey (keycode.e)) transform.position += -vector3.up * movespeed * time.deltatime; } // lateupdate called after update each frame void lateupdate () { // set position of camera's transform same player