Just did some valuable Google searching on FPS games on handheld devices and though many games utilize the screen swipe to rotate the camera it is noted that this is a very unpredictable and uncomfortable approach across various platforms. It was also noted that when other buttons (ex. shoot button) are on screen that swiping the screen to rotate the camera is just not recommended.
For nice visual appearance reasons you can hide these virtual buttons until the user/player touches the corner where the respective virtual buttons are located and then make them reappear as needed.
I have added a second virtual button to take care of the camera rotation and if anybody else is interested heres the code.
SetScreenResolution(1024, 768, 0 )
SetVirtualResolution(1024, 768 )
SetOrientationAllowed(0, 0, 1, 0 )
AddVirtualJoystick(1, 60, GetDeviceHeight() - 60, 100)
AddVirtualJoystick(2, GetDeviceWidth() - 60, getDeviceHeight() - 60, 100)
SetSyncRate(0,0)
SetVSync(1)
SetGenerateMipmaps(1)
SetClearColor( 151,170,204 )
Grass = LoadImage("Grass.png")
Ground = CreateObjectPlane(128, 128)
RotateObjectGlobalX(Ground, 90)
SetObjectImage(Ground, Grass, 0)
Global Player as Integer
Player = CreateObjectBox(2, 6, 2)
SetObjectPosition(Player, 0, 2, 0)
SetCameraRotation(1, 0, 0, 0)
Do
//****** CAMERA MOVE-STRAFE ******//
// FPS# = 1.0 / GetFrameTime()
FPS# = ScreenFPS()
Speed# = 20.0 / FPS#
Strafe# = 10.0 / FPS#
// VIRTUAL JOYSTICK MOVE/STRAFE
CamMove# = -GetVirtualJoystickY(1) * 1.0 * Speed#
CamStrafe# = GetVirtualJoystickX(1) * 1.0 * Strafe#
MoveObjectLocalZ(Player, CamMove#)
MoveObjectLocalX(Player, CamStrafe#)
/////****** ROTATION *******/////
FPS# = ScreenFPS()
RotateSpeed# = 75 / FPS#
CamRotateY# = GetVirtualJoystickX(2) * 1 * RotateSpeed#
MoveCameraLocalX(1,CamRotateY#)
CamRotateX# = GetVirtualJoystickY(2) * 1 * RotateSpeed#
MoveCameraLocalY(1,CamRotateX#)
SetCameraPosition(1, GetObjectX(Player),GetObjectY(Player), GetObjectZ(Player))
SetCameraRotation(1, GetCameraAngleX(1) + CamRotateX#, GetCameraAngleY(1) + CamRotateY#, 0)
SetObjectRotation(Player, GetObjectAngleX(Player), GetCameraAngleY(1), GetObjectAngleZ(Player))
REM I still have to set the limits...
Sync()
Loop