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
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
About the author
#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
Thanks.
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.
Torque 3D Owner Martin "Founder" Hoover