Vousk-prod. Posted March 25, 2014 Share Posted March 25, 2014 Hi, If a pointer event starts inside the canvas but then goes outside while holding mouse button or touch, is there a way to continue the interaction with scene ? (for instance to keep rotating the camera even if the mouse goes outside the webgl canvas) ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 25, 2014 Share Posted March 25, 2014 You have to capture the mouse (or the pointer). In this way the canvas will continue to receive events:https://developer.mozilla.org/en-US/docs/Web/API/Element.setCapture Quote Link to comment Share on other sites More sharing options...
realizer Posted March 27, 2014 Share Posted March 27, 2014 If you use fullScreen-mode, you automatically get the pointerlock-feature, try engine.switchFullscreen(true); GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted March 28, 2014 Author Share Posted March 28, 2014 Ok, thanks for your suggestions Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 16, 2014 Author Share Posted December 16, 2014 element.setCapture definitly do the job. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.