How To Get Global Touch Input To Work With In-Torque Simulator?
by Jack-S- · in iTorque 2D · 11/05/2011 (5:34 pm) · 8 replies
Hi, I recently posted on an Issue I was having getting a resource to work which I assume uses the Global touch input code however I noticed it wasnt running the code. It wasnt until I investigated the global touch input system that I reallised that it might actually only be tested on the device and not in the iTorque windows simulator.
I used this exact code with the function names and action map name being different
new ActionMap(menuActionMap);
menuActionMap.bind(touchdevice, touchdown, "menuTouchDown");
menuActionMap.bind(touchdevice, touchmove, "menuTouchMove");
menuActionMap.bind(touchdevice, touchup, "menuTouchUp");
menuActionMap.push();
However when I go to test this global touch system none of the functions actually get called which has led me to believe its device only code.
Is there any way to get the Global touch input system working in the iTorque simulator??
I have already tried filling in the above commands with onmouse but nothing is happening.
Any help would be great.
Thanks in advance.
I used this exact code with the function names and action map name being different
new ActionMap(menuActionMap);
menuActionMap.bind(touchdevice, touchdown, "menuTouchDown");
menuActionMap.bind(touchdevice, touchmove, "menuTouchMove");
menuActionMap.bind(touchdevice, touchup, "menuTouchUp");
menuActionMap.push();
However when I go to test this global touch system none of the functions actually get called which has led me to believe its device only code.
Is there any way to get the Global touch input system working in the iTorque simulator??
I have already tried filling in the above commands with onmouse but nothing is happening.
Any help would be great.
Thanks in advance.
About the author
#2
How would I change the actionMap code to work with a mouse??
11/06/2011 (11:41 am)
Ok, but per object touch inputs work in-simulator so is there a way I can say change the touchdevice to something else so that it runs with a mouse?How would I change the actionMap code to work with a mouse??
#3
11/07/2011 (8:24 am)
Does anybody know if I can write actionMaps for mouse commands so I can test global Inputs in simulator??
#4
However this doesn't appear to register in the torque simulator. I had to add object specific events for my clicking to register.
11/07/2011 (2:25 pm)
I am curious about this as well. I was attempting to use global touch methods for some "touch screen to move on" action.However this doesn't appear to register in the torque simulator. I had to add object specific events for my clicking to register.
#5
Touch will only work on iOS simulator and the device.
11/08/2011 (12:40 am)
yes you can hook up the mouse and you need to actually.Touch will only work on iOS simulator and the device.
#6
@ Marc - Thanks I suspected this was the case, I am glad it works in the iOS simulator though as I havent yet purchased developer rights.
But thanks guys for replying!
11/08/2011 (6:33 am)
@ David - yeah that creates a problem as now if I need to test global touch commands im going to have to move the project over to mac for a bit.@ Marc - Thanks I suspected this was the case, I am glad it works in the iOS simulator though as I havent yet purchased developer rights.
But thanks guys for replying!
#7
I would expect the global "touch" events would have the same behavior.
11/09/2011 (7:05 pm)
That's just weird since the object specific "touch" methods work in the torque simulator with a mouse click.I would expect the global "touch" events would have the same behavior.
#8
As David states the object specific touch work with a mouse interaction, by changing a variable. Why are you not able to do so with global mouse clicks. I love the addition of the multi touch and everything else in 1.5, but if I can't develop on it like what was promised I feel that I wasted my money are should have choosen a different engine.
Has anyone figured out a work around for this issue yet so on a PC you can test your touch commands or even get the mouse to bind and respond to an actionMap?
05/06/2012 (3:22 pm)
I know that this is an old Post but I am trying to figure out how to get around this aswell. I don't mind having to make different action maps to test my code for using the mouse on my system and the touch commands for when I start porting it. But I currently do all my development on a PC which was one of the features that made me lean towards iTorque for development. It is pointless to run a simulator that can't even simulate what you are trying to program.As David states the object specific touch work with a mouse interaction, by changing a variable. Why are you not able to do so with global mouse clicks. I love the addition of the multi touch and everything else in 1.5, but if I can't develop on it like what was promised I feel that I wasted my money are should have choosen a different engine.
Has anyone figured out a work around for this issue yet so on a PC you can test your touch commands or even get the mouse to bind and respond to an actionMap?
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft