//AGK 2.0.19 //Rotate Camera local via Button clicks #option_explicit SetVirtualResolution(100,100) SetClearColor(0,64,0) local box box=CreateObjectBox(1,1,1) SetObjectPosition(box,0,0,5) SetCameraPosition(1,0,0,0) SetCameraRotation(1,0,0,0) AddVirtualButton(1,5,5,10) SetVirtualButtonText(1,"X") AddVirtualButton(2,15,5,10) SetVirtualButtonText(2,"Y") AddVirtualButton(3,25,5,10) SetVirtualButtonText(3,"Z") AddVirtualButton(4,35,5,10) SetVirtualButtonText(4,"-X") AddVirtualButton(5,45,5,10) SetVirtualButtonText(5,"-Y") AddVirtualButton(6,55,5,10) SetVirtualButtonText(6,"-Z") AddVirtualButton(7,65,5,10) SetVirtualButtonText(7,"0,0,0") do if GetVirtualButtonPressed(1) RotateCameraLocalX(1,5) endif if GetVirtualButtonPressed(2) RotateCameraLocalY(1,5) endif if GetVirtualButtonPressed(3) RotateCameraLocalZ(1,5) endif if GetVirtualButtonPressed(4) RotateCameraLocalX(1,-5) endif if GetVirtualButtonPressed(5) RotateCameraLocalY(1,-5) endif if GetVirtualButtonPressed(6) RotateCameraLocalZ(1,-5) endif if GetVirtualButtonPressed(7) SetCameraRotation(1,0,0,0) endif sync() loop end