Game Development Community

1.1.1 Mac: moveMap.bind() broken for mouse movement

by Vern Jensen · in Torque Game Builder · 09/02/2006 (4:07 pm) · 3 replies

I've seen code such as this recommended either online, or in a demo, or in a forum post:

moveMap.bind( mouse, xaxis, yaw );

function yaw(%val) 
{ 
	echo("xaxis = " @ %val);   
}

There are variations, such as using "mouse0" instead of "mouse", and using "new ActionMap()" first and using the ActionMap instead of the moveMap (this is probably from an outdated tutorial, but it was online as well). But no matter what variation I use, I'm unable to get this to work. Other readers have confirmed this seems to be broken for mouse movement. (Works fine for keyboard.)

Combine this with the brokenness of setMousePosition() as detailed in my previous post, and you can see how it's frustrating if you're trying to make a game where some object's movement is based on the mouse's movement.

#1
09/04/2006 (11:37 am)
I have not verified this but if you set the following it is supposed to work:

yourguiname.nocursor = true;

-Unk
#2
09/04/2006 (10:38 pm)
I'm confused, Unk. I don't have any GUI right now. This is just a bare-bones Torque project. What value would I pass for the "yourguiname" variable?
#3
09/04/2006 (11:08 pm)
FYI, I've found a solution that works. Seems Unk was right:

http://www.garagegames.com/mg/forums/result.thread.php?qt=26532

Scroll to the code posted by Edward F Maurina III on Sep. 4 2006. It works!