Game Development Community

What;s the reason whenerver i show mouse..

by Kenny · in Torque Game Engine · 02/07/2007 (8:41 am) · 3 replies

I have set a custom way to rotate camera by right-click mouse,
but once i change noCursor = "1" to noCursor = "0" in playGui.gui to let mouse shown,
the camera rotation is dead.



i just revive default.bind.cs and default.cs,and change nothing within C++ code.
how to let camera rotation alive?

#1
02/07/2007 (7:28 pm)
The GUI system switches mouse input handling and messaging when you have the cursor turned on. Track down what happens when noCursor is set to 0, within the engine.

When there is no cursor, and you right mouse click, PlayGUI is probably taking that input and reacting to it (most likely by affecting the moveMap and camera).

However, when you have a cursor turned on, that right mouse click is being sent to a separate canvas and messaging system.
#2
02/08/2007 (7:37 pm)
Sorry, Perry, I tried my best to find any code relative with "noCursor",but failed.
@@ i feel sad...
#3
02/08/2007 (7:49 pm)
Well, you have a great example to go by...

The WorldEditor implements exactly what you want to do: movable mouse cursor on screen, with right-mouse click for camera movement.

AFX (a must purchase for any potential long time TGE user), also implements this functionality.

Have a look at the EditTSCtrl class found in \engine\editor\EditTSCtrl.h, particularly EditTSCtrl::onRightMouseDown() in EditTSCtrl.cc.