Game Development Community

Mouse Input

by Doug Linley · in Torque Game Builder · 04/18/2006 (3:58 pm) · 2 replies

You guys are sure going to be sick of me by the end of the week.

I am now trying to add mouse input to my little prototype. The first thing I did was go under common/preferences/ and change MouseEnabled to 1 in DefaultPrefs.cs and prefs.cs.

Then I added the following callback function:

function SceneWindow2D::onMouseMove(%this, %modifier, %worldPos, %mouseClicks)
{
   
   echo("mouse moving");

}

But when I run the game and check the console, I can see that my mouse.cs is executing, but nothing is getting printed to the console when I move. I read the Input document that comes with TGB. Can anyone tell me what I missed?

Thanks!

#1
04/18/2006 (4:07 pm)
TGB Beta 2? There is a bug & workaround described in this thread.
www.garagegames.com/mg/forums/result.thread.php?qt=42987
#2
04/18/2006 (4:27 pm)
Thanks a ton Alex!