9 years ago by AndrewMast
I am using the plugin from demo on this page.
Entities, collision, etc work fine. Except for the joints.
I run the following code and it produces an error.
Code: (Btw, the bodies aren&
Error:
The line of code (causing the error in lib.js):
Entities, collision, etc work fine. Except for the joints.
I run the following code and it produces an error.
Code: (Btw, the bodies aren&
039;t #undefined
. I've checked that.)var jointDef = new Box2D.Dynamics.Joints.b2JointDef(); jointDef.bodyA = entity1.body; jointDef.bodyB = entity2.body; jointDef.collideConnected = false; var joint = ig.world.CreateJoint(jointDef);
Error:
[Error] TypeError: null is not an object (evaluating 'c.m_prev=null') - CreateJoint - lib.js
The line of code (causing the error in lib.js):
...CreateJoint=function(a){var c=q.Create(a,null);c.m_prev=null;if(c.m_next=this.m_jointList)...