I've added multich and accelerometer support
to gamekit.
multitouch_test.blend is the blend file
that I changed IPhoneDemo to use.
I've also included that as a separate
file.
Rather than repeat myself, I'll
just include the post that I wrote on this:
I've added multi-touch and accelerometer support to gamekit svn revision 905.
I have a patch for it but I can't seem to upload it to the forum.
I also changed the blend file from momo_blend_i.blend
to a simpler one that demonstrates that basic idea how
to utilize the new features since momo_blend_i.blend
was a bit too complicated to show the idea.
Essentially, for multi-touch support, I modified gkWindowIOS to
use OIS::MultiTouch and it tracks each touch as a joystick.
The same touch remains the same joystick for the duration
of the touch. I used the OIS iPhone code with a couple
modifications such as touch tracking. The default
allows up to 10 touches but this can be changed by
changing OIS_MAX_NUM_TOUCHES in OISMultiTouch.h.
For accelerometer support, I also added it as a joystick.
The gkWindow treats joystick 0 as the accelerometer
(if none is present, joystick 0 always has zero acceleration,
but I've only tested it on an iPad 2.) Joysticks 1 to 11
hold the data for the touches.
Let me know if you want me to make any changes
before applying it or if you need me to explain
portions of it better.
-- Jonathan
Original issue reported on code.google.com by jonathan...@gmail.com on 14 May 2011 at 6:30
Original issue reported on code.google.com by
jonathan...@gmail.com
on 14 May 2011 at 6:30Attachments: