Game Development Community

Can't activate mouse

by Stephen Hagyard · in Torque Game Engine · 02/17/2006 (10:21 am) · 3 replies

Hi

I'm developing a game from scratch and I can't get the mouse active within gameTSCtrl. Using echoInputState I show

Activating DirectInput...
keyboard0 input device acquired.
DirectInput is enabled and active.
- Keyboard is enabled and active.
- Mouse is enabled and inactive.
- Joystick is disabled and inactive

Any reason why I'm getting this. How do I set the mouse status to active?

Thanks in advance.

#1
02/18/2006 (7:16 am)
If your trying to use the mouse from within the game hud, I would de-activate directInput.

From what I understand of how it works, is that the mouse is enabled but it never actually moves from its center spot where the crosshair is. TGE catches its movement and uses those but the mouse cursor doesn't move (and is hidden) It keeps the mouse from moving out of the Game window and onto some other app for when you click a button.
#2
02/21/2006 (11:43 am)
I tried that - it didn't make any difference :-( Thanks for the suggestion though.

I don't know whether there is some way to turn the mouse on somewhere that I am missing.
#3
02/21/2006 (12:22 pm)
I've found it. The Cursor control needs to be included. It feels like (and I haven't looked at the code to confirm) that if the cursor is displayed it is passed outside the gui where it is analysed by the gui routines and is being ignored. Only when the cursor is off is the control passed to the current keymap.