Multiple mice issue
by Phil Wu · in Torque Game Builder · 09/26/2008 (2:39 am) · 4 replies
Hello everyone, I am just wondering that are there ways to use multiple mice in games made by TGB. I looked up the input reference and saw that mouse could be bound to action map with different index indicating different mouse. I tried to plug into another mouse on pc and write simple code binding left button for mouse0 and mouse1. Sadly, no matter which left button I pressed on different mouse, I always got the callback function run for the mouse0. So is it possible to have multiple mice running and being detected individually(and if different cursor could be shown without too much effort)?
#2
new ActionMap(a);
a.push();
a.bind( "mouse0", "button0", "theCallbackFunction" );
Hope this help. Good luck.
11/03/2008 (7:25 pm)
About a month long since I post, I guess there is not solution to operate multiple mice in torque. Therefore, I gave up and started to work on multiple joysticks. And Nikki, you can just check the input reference section in documentation. In case you still don't figure out how it is done, I will state the procedure to get your input start. Briefly, you need to have an instance of ActionMap, then you push this instance into the stack before using it. You then use method of that instance, bind, to bind your mice(keyboard, joystick). Whenever you want to reverse this process, just use another method called unbind. So the code might look like this.new ActionMap(a);
a.push();
a.bind( "mouse0", "button0", "theCallbackFunction" );
Hope this help. Good luck.
#3
11/03/2008 (7:30 pm)
My "guess" is that this would require digging into the c++ source code of the engine. That said it could be done using c++.
#4
It's possible, you just need to dig in the MSDN and engine input system a little.
11/03/2008 (9:49 pm)
I was able to get multiple mice running at one point...even a mouse and Wii remote at the same time. However, I had to do this completely in C++ and it was Windows specific.It's possible, you just need to dig in the MSDN and engine input system a little.
Torque Owner Nikki Valens