1 decade ago by Koen
When I try to create a b2.RevoluteJoint, I get the following error:
Is this a bug in the ported box2d version or am I doing something wrong?
My code looks roughly like this:
Thanks in advance,
Koen
Error: this.__varz is not a function Source file: http://xxxxxxxx/impact/lib/plugins/box2d/lib.js Line: 290
Is this a bug in the ported box2d version or am I doing something wrong?
My code looks roughly like this:
var motorDefinition = new b2.RevoluteJointDef(); motorDefinition.Initialize(ig.world.GetGroundBody(), this.body, new b2.Vec2((this.pos.x + this.size.y / 2) * b2.SCALE, (this.pos.y + this.size.y / 2) * b2.SCALE)); motorDefinition.lowerAngle = -20 * Math.PI; motorDefinition.upperAngle = 0.0 * Math.PI; motorDefinition.enableLimit = true; motorDefinition.motorSpeed = 0.0; var motor = b2.RevoluteJoint(ig.world.CreateJoint(motorDefinition));
Thanks in advance,
Koen