I've been plugging away at trying to find out how to create joints in Box2D. I'm pretty much stumped. If anyone has done this and could give me somewhere to start or even demo code, that'd be amazing.
Thanks!
1 decade ago
by rooster
I know this is an old post, but have you figured this out? I am having the same problem. I can create joints no problem in Box2d, but I am having difficulty putting them in Impact. I am probably not including them in the right location. Right now I have a distance joint in an entity's "update" method, so that when the player presses a key a joint will be created. However I am also striking out.
Need help here too. In my Box2DEntity, I have a createBody function, in which I create a couple bodies, and then add the joint def code. Nothin.
var jointDef = new Box2D.Dynamics.Joints.b2WeldJointDef();
jointDef.Initialize( this.trunk, this.head, this.head.GetWorldCenter() );
this.joint = ig.world.CreateJoint( jointDef );
Page 1 of 1
« first
« previous
next ›
last »