AtomicGameEngine / AtomicExamples

Examples for the Atomic Game Engine
https://www.AtomicGameEngine.com
96 stars 58 forks source link

How to lock mouse pointer in the player (Windows)? #78

Closed n9 closed 8 years ago

n9 commented 8 years ago

Is it possible to lock mouse pointer in the player for Windows, so it is possible to turn around using mouse?

benwolf commented 8 years ago

To wrap the Cursor in the window add the line "Atomic.input.setMouseMode(Atomic.MM_WRAP);" to main.js. To hide the Cursor add the line "Atomic.input.setMouseVisible(false);" also.

You could also add a hotkey to toggle it or similar.

JoshEngebretson commented 8 years ago

@n9 Please use the QA system to ask questions: https://qa.atomicgameengine.com/ it will help others find answers...

@benwolf Good answer :)

Thanks!