Closed mbrazell closed 8 years ago
Thanks for reporting, will get it looked at soon.
This should now be fixed on the 0.9 branch
Thanks for the update!
On Sat, Jul 25, 2015 at 11:57 PM, Chandler notifications@github.com wrote:
This should now be fixed on the 0.9 branch
— Reply to this email directly or view it on GitHub https://github.com/chandlerprall/GoblinPhysics/issues/44#issuecomment-124942713 .
Adding a MeshShape as a child shape to a CompoundShape causes "Uncaught TypeError: undefined is not a function", which references line 3578 of goblin.js:
use_contact = contact.object_a.emit( 'newContact', contact.object_b, contact );
"emit" is undefined.
I encountered this issue in my own code, and then re-created it in the mesh-shape-statue demo by adding the MeshShape object as a child to a CompoundShape before adding it to the rigid body:
// shape is the MeshShape of the statue var compoundShape = new Goblin.CompoundShape(); compoundShape.addChildShape(shape, new Goblin.Vector3(), new Goblin.Quaternion());
mesh.goblin = new Goblin.RigidBody( compoundShape, 0 );