Release: Minor lockMouse() problem
by Vern Jensen · in Torque Game Builder · 06/22/2006 (2:07 pm) · 1 replies
I'm using lockMouse() to keep the mouse confined to my game's window during gameplay. The cursor is hidden, and controls rotation of a ship. However, when the user pushes Esc, I pause the game, show the mouse, and call lockMouse(false) so that the user can switch to other applications.
There is one small problem with this. The first time you move the mouse after pushing Esc, it visibly "jumps" to an area close to the middle of the window. After that, it moves normally. So it's as if lockMouse has some residual effects even after it's called with a value of false.
It's not a show-stopper, but something that I'd like to have cleaned up before releasing my game.
There is one small problem with this. The first time you move the mouse after pushing Esc, it visibly "jumps" to an area close to the middle of the window. After that, it moves normally. So it's as if lockMouse has some residual effects even after it's called with a value of false.
It's not a show-stopper, but something that I'd like to have cleaned up before releasing my game.
Torque Owner Vern Jensen
When I unpause, I call Canvas.hideCursor(); and lockMouse(true). However, if the mouse is outside of the window when the user unpauses, the mouse is moved back into the center of the screen and *stays visible* until it's moved again.
Again, not a show-stopper, but something that I wouldn't want to have in a polished game.