Is Physics2D.Net compatible with Multi Touch?

12 views
Skip to first unread message

Cheng Teck

unread,
Oct 12, 2009, 3:44:29 AM10/12/09
to Physics2D.Net
Hi there.. Just asking..
Is Physics2D.Net compatible with Multi Touch?
As I am doing a multi touch game, 2 players should be able to control
the balls on the screen using their fingers.
However, I can only control 1 ball body at 1 time even though I have
multiple fingers on the screen.
Screenshot below : http://i36.tinypic.com/1zh1z6w.png

Daniel Story

unread,
Oct 12, 2009, 9:52:30 AM10/12/09
to Physics2D.Net
The physics engine can handle multiple controled bodies; but you'll
need to retrieve the multiple input device infomation yourself. This
might be a good place to start http://code.msdn.microsoft.com/WindowsTouch,
it has a C# example project.

It's all a matter on how the input data is handled to simulate
multiple player control. What do you currently have for this?

Daniel Story.

Cheng Teck

unread,
Oct 12, 2009, 11:23:26 AM10/12/09
to Physics2D.Net
Hi there.. Thanks for replying again.. :)
I am just modifying my code from the Physics2D.Net example Demo U..
So, I am using the OpenGL and SDL dll and stuff..
Do they support multi touch?
So all , I need is to change all the mouse event handler to stylus
event handler?

On Oct 12, 9:52 pm, Daniel Story <danst...@gmail.com> wrote:
> The physics engine can handle multiple controled bodies; but you'll
> need to retrieve the multiple input device infomation yourself. This
> might be a good place to starthttp://code.msdn.microsoft.com/WindowsTouch,

Daniel Story

unread,
Oct 13, 2009, 11:34:10 PM10/13/09
to Physics2D.Net
I haven't looked at the "Multitouch Scratchpad" C# sample project
myself, but yes you would want to change the mouse event to the event
that provides the multi-touch data.

Cheng Teck

unread,
Oct 14, 2009, 9:47:58 AM10/14/09
to Physics2D.Net
Hi there..
I found something useful I guess in the link below..
http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/06/18/windows-7-experimenting-with-multi-touch-on-windows-7-part-1.aspx
(WM_TOUCH) representing touch up/down/move with identification of
multiple touch points
In this case to move the ball around..
I need the mouse up, mouse down and mouse move to be change right?
Do I need to pass in the touch id?
Reply all
Reply to author
Forward
0 new messages