aerys / minko

3D framework for web, desktop and mobile devices.
http://minko.io
Other
906 stars 210 forks source link

Can I set the mouse cursor position? #219

Closed KernelFreeze closed 8 years ago

KernelFreeze commented 9 years ago

Hello, I'm creating a First person video game and I need to move the mouse to the center of the window, I know that I can move it with SDL (SDL_WarpMouseInWindow), but I don't how to do it with minko. So Can I move the mouse? Sorry for my bad english

warrenseine commented 9 years ago

Minko uses SDL to setup the window and the context. Therefore, you can use SDL functions directly in your C++ code.

Depending on your target platform, it might be a little harder. For instance, in HTML5, the mouse is managed by the browser and SDL functions are just wrappers around browser APIs. I don't know if the SDL functions to control the mouse have been correctly implemented in Emscripten. You'll have to test.

KernelFreeze commented 8 years ago

Ok, thanks! :)