Just move the camera!

Hi, good afternoon

i just need to learn the script how to move the camera
to rigth or left when press a
GUI.RepeatButton( Rect( x,x,x,x ) … button please.

I put a picture here to show what I need
any help will be apreciate very much.

transform.Translate( transform.right * direction * distance);

thats it :wink:

  • direction is either 1 for right or -1 for left, set by your left / right buttons
  • transform.right is the right vector out of the view of the camera transform and exists automatically (right, up and forward are 3 special vectors that exist on the transform for the object specific directions as well as on Vector3 for global vectors)
  • distance is the amount of units you want the camera to move

Thanks you Dreamora, very nice looking this for much time ago.
thanks. !
now is working. !