Mouse pointer and First Person Controller?

Whenever i move my mouse around to look around in first person i can move mouse waaaaay of the game (running in the webplayer). How do i prevent this so that the mouse pointer can´t go outside the game and is in sync with the camera.

One of the most common ways of stopping this is by using Screen.lockCursor, which will lock the mouse to the center of the screen so that wherever you look will be in sync with the mouse without it going outside of it. These are the docs on it http://docs.unity3d.com/Documentation/ScriptReference/Screen-lockCursor.html

This script will also hide the cursor when it is locked, so you will need a reticule in order to show the player where the mouse is, this can be done with a variety of methods including using GUITextures http://docs.unity3d.com/Documentation/Components/class-GuiTexture.html

However make sure to read this part about webplayers in the docs “In the web player, the cursor may only be locked after the user has clicked on the content and the user has not left the content view with the cursor. After the user presses escape or switches to another application the cursor will be automatically unlocked. The cursor lock will also be lost when exiting full screen mode.” Therefore you will need to make the player click first before the lock will work correctly, possibly by having to click a play button to play the game.

If you need any clarification just ask!