This project has moved and is read-only. For the latest updates, please go here.

Moving Body with mouse without a lag

Topics: Developer Forum
Apr 2, 2013 at 11:40 PM
Hi Guys,

I'm developing air hockey game, and I've got a problem with low latency dragging paddle objects over the screen.

I'm using FixedMouseJoint with such code:
var mouseJoint = new FixedMouseJoint(paddle, paddle.Position)
                                     MaxForce = 10000.0f*paddle.Mass,
                                     DampingRatio = 1,
                                     CollideConnected = true,
                                     Frequency = 60.0f
and changin paddle position like this:
paddle.JointList.Joint.WorldAnchorB = mousePosition
The problem is that paddle is moving with a little lag, and I'd like to reduce it as much as possible. Changing paddle position isn't a soluton, because it messes up physics, so I need to use something different.

Any ideas?