How can i make change the First Person or Camera position by clicking a Buttom?
In other words, With Which GUI-JavaScript command can I change my First Person or Camera View position, With a click on a button? I want to Fly from position A to position B
function OnGUI () {
if (GUI.Button (Rect (10,10,150,100), "I am a button")) {
transform.Translate (0,10,0);
}
}
That will move your camera from point a to point b instantaneously. All you have to do is put it on your camera. On the press of a button, it will move from where it is now to wherever you specify in this line: