MousJoint not moving body to target

Hi,

I'm using a MouseJoint created as follows. I'm using it to make the body follow the sprite.

Code:
// Define the ground body.
    b2BodyDef groundBodyDef;
    groundBodyDef.position.Set(0, 0); // bottom-left corner
    b2Body *groundBody = _game.world->CreateBody(&groundBodyDef);
   
    b2MouseJointDef mjd;
    mjd.collideConnected = true;
    mjd.target = b2Vec2(_pos.x * [Box2DHelper metersPerPoint], _pos.y * [Box2DHelper metersPerPoint]);
    mjd.bodyB = self.body;
    mjd.bodyA = groundBody;
    mjd.dampingRatio = 0;
    mjd.frequencyHz = 100;
    _mj = (b2MouseJoint *)_game.world->CreateJoint(&mjd);


and in the update call, I'm doing the following

Code:
-(void) update:(ccTime)dt {
    b2Vec2 pos = b2Vec2( self.position.x * [Box2DHelper metersPerPoint], self.position.y * [Box2DHelper metersPerPoint]);
    if(_mj) {
        _mj->SetTarget(pos);
    }
}


But this doesn't seem to be moving the body at all. Any ideas on what I'm missing?
The mouse joint should have a non-zero maxForce if you want it to do anything.

A few other things you could try/check:
- make sure the bodyB is dynamic
- make sure the SetTarget is actually being called
- use the default values of damping ratio and frequency

If in doubt you can always check the header of a joint to see what settings the jointDef has, and what the default values are:
http://code.google.com/p/box2d/source/b ... useJoint.h
damn, it was the maxforce. Thanks!

Original thread: https://box2d.org/forum/viewtopic.php?t=9807