safon007 / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

No response to touch inputs on iOS #264

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
See this link: http://gamekit.org/forum/viewtopic.php?f=2&t=480

What is the expected output? What do you see instead?
The fix is: in gkWindowIOS::touchPressed(const OIS::MultiTouchEvent& arg), 
replace the following 
    {
        m_mouse.buttons[gkMouse::Left] = GK_Pressed;
    }
with 
    {
        gkMouse& data = m_mouse;        
        OIS::MultiTouchState state = arg.state;

        transformInputState(state);

        data.position.x = (gkScalar)state.X.abs;
        data.position.y = (gkScalar)state.Y.abs;
        data.relative.x = (gkScalar)state.X.rel;
        data.relative.y = (gkScalar)state.Y.rel;
            data.buttons[gkMouse::Left] = GK_Pressed;
        data.moved = false;

        data.wheelDelta = 0;
    }
Then touch response will be very quick. Use a simple blender file such as 
touch_test.blend provided in the link 
(http://gamekit.org/forum/viewtopic.php?f=2&t=480) to verify. Apparently the 
old code doesn't handle tap events completely.

What version of the product are you using? On what operating system?
This issue should exist in all the latest versions. 

Original issue reported on code.google.com by afterb...@gmail.com on 28 Aug 2012 at 8:05

GoogleCodeExporter commented 8 years ago
I will test and commit this next week when I got a device in my hands :D. Thx, 
so far

Original comment by thomas.t...@googlemail.com on 31 Aug 2012 at 10:04

GoogleCodeExporter commented 8 years ago
Ok, I commited your patch without actually testing it. Would be great if you 
could test the trunk-version (especially since I also updated to the latest 
ogre-trunk :D )

Thx for the patch...

http://code.google.com/p/gamekit/source/detail?r=1170

Original comment by thomas.t...@googlemail.com on 4 Sep 2012 at 1:43

GoogleCodeExporter commented 8 years ago
Thanks!

I haven't got around to test this in the trunk until now. But before I could do 
something,  I found another build error in the latest version. See 
(http://code.google.com/p/gamekit/issues/detail?id=270). 

Original comment by afterb...@gmail.com on 8 Sep 2012 at 7:34

GoogleCodeExporter commented 8 years ago
Cool, I finally could test it and this is really much better. Thx for the patch.

Original comment by thomas.t...@googlemail.com on 9 Sep 2012 at 1:07