The code I use to move the camera is very simple and it works on PC But when loading the game in a webpage, the camera movement becomes very strange. Now I might have a clue as to why but no idea as to how to fix it:
Game Location:
http://wigglevault.com/games/DreamTemple/DreamTemple.html#
So the code I use to control the camera is this:
foldstart // MOUSE LOOK
mouse_x = mouse_x + (GetRawMouseX()-width/2)
mouse_y = mouse_y + (GetRawMouseY()-height/2)
if (mouse_y > 800) then mouse_y = 800 // limit the view bottom
if (mouse_y < -800) then mouse_y = -800 // limit the view top
SetObjectRotation(playerObject,0,mouse_x*0.1,0)
SetCameraRotation(1,mouse_y*0.1,mouse_x*0.1,0)
SetRawMousePosition(width/2,height/2)
// apply only location of the player object to camera
setCameraPosition(1,getObjectX(playerObject),getObjectY(playerObject)+19,getObjectZ(playerObject)) // set cam to player object position
// ----------
// ----------
foldend
To be honest I am surpirsed I got away with this in the PC version as it is but I do think I might know where the issue lies. The camera rotation is set from a separate variable. What I do is set the mouse to the center of the game window (using values so a 1280x720 game window I'd set the mouse to 640 x 360) and then when the mouse moves I read it's position and subtract the 640 from X and 360 from Y and the result is used to rotate the camera. So my guess is that the HTML window does not respond to fixed resolution and mouse coordinates. It may look like I have to re-write the camera code but I have not found any examples for App game kit. Only DarkBasic.
Eisenstadt Studio: Eisenstadtstudio.com
Composers Page: Milesthatch.net