Capture Mouse in Web Player?

Is there a way to capture the mouse so that it can’t interact with other programs?

I was just going through some of the games on the Showcase forum trying them out and every time I move the mouse out of the browser window and click the player loses focus. This makes them unplayable, for me at least.

No thats for trivial security reason forbidden completely by any browser plugin layer

I must be missing something. How are these games playable then? For example:

http://forum.unity3d.com/threads/102289-Game-Protoype-Project-Nova-Pericythion

I try to play this and I end up clicking outside the browser, closing the browser, changing tabs, etc.

normally you go into fullscreen with this kind of games, you don’t play them in embedded mode, embedded mode is for “facebook type of games” where its not about reflexes, mouse speed and stuff like that but “taking your time for stupid click grinding” :wink:

that or its about games not using the mouse like raptor safari

Thanks for the explanation. Too bad.

it’s possible though… (mouse locking) during play. (so you won’t see the arrow etc. And all movement is related to that application)
Seen it all too often, webbased and standalone, with unity titles.
Even played a unity shooter game inside facebook, and it used it aswell.

I was just looking at some of the games on Wooglie and they are able to capture the mouse somehow. Anybody have any idea how?

Examples:

I finally found the answer right in the docs:

Just put a GUITexture that covers the screen in your scene and add a script with the code from the docs to it. The user does have to click on the screen, though. You could also use a button.