Hello.
I have noticed that the MouseLook and MouseOrbit, and probably all similar scripts, still working in the web browser after I move the mouse cursor away, when the mouse cursor is outside the boundary, or outside the browser window. Content is still working even if you drag the browser window, on windows also during resizing the window.
How to get rid of it ?
You can do this from a script by getting the position of the mouse using Input.mousePosition and see if it is outside the bounds of the player window (you can get the width and height of the window using the Screen class. Basically, if the mouse position is outside the bounds of the window, then don’t rotate the camera.
Thank you for the answer. It looks like I have to learn scripting, unless …
Are there some ready to use, usefull scripts, for all programing analphabets (most of the world population) ?
Ah, one more question.
I have to create a presentation with the mouse orbit script, but trigered with the mouse button, I have found some scripts doing this.
I want the OnMouseDown action to be restricted to the content window, but when I press and hold the button, the camera should rotate with no restrictions. Is it possible ?