Game Development Community

Can't bind mouse moves

by Vijay Myneni · in RTS Starter Kit · 11/20/2004 (1:43 am) · 4 replies

Hello,

I can't seem to map the mouse axes to anything. Commands like

moveMap.bind(mouse0, "xaxis", yaw);

don't seem to call the callback ("yaw" in this case) when I move the mouse around.

Is this because movement is being overriddden for the sake of RTS functionality like edge-scrolling and click-drag selection? How can I get the binding functionality back? I'm trying to implement a godcam that I can control using mouse movement. (The wheel, "zaxis", works, as demonstrated in starter.rts, but no other axis works).

Thanks,
Vijay

#1
11/20/2004 (7:23 am)
Are you including the binds in the config.cs files? I noticed that when I only put the bind in default.bind.cs that it didn't work, and I had to include it in config.cs (there are two of these files, one in starter.rts/client and starter.rts/client/scripts/client/ not sure why).
#2
11/20/2004 (8:12 am)
Ya, I've done that. In general, I can get binds to work. I can bind the functions I've written to any key, or the mouse z-axis, and it works great. It just doesn't work if I try to use the mouse x-axis or y-axis. It's really strange.
#3
11/20/2004 (8:57 am)
Nevermind, I figured it out. I hunted through the code and apparently the canvas captures mouse move events if the cursor is on and handles them so that they never get passed to the bindings.

Thanks.
#4
11/20/2004 (5:59 pm)
Vijay, thanks for pointing this out to people. We should've documented this fact better.