Hi @all again,
I have a question: I want to remove a bulletMesh (bullet) with the dispose function if it collide with something like
bullet.physicsImpostor.onCollideEvent = function (self, other) {
console.log(self, other, self.position);
self.object.dispose();
};
Got an Error:
Uncaught TypeError: Cannot read property '_wakeUpAfterNarrowphase' of undefined
at World.internalStep (cannon.js:13514)
at World.step (cannon.js:13211)
at CannonJSPlugin.executeStep (babylon.max.js:45178)
at PhysicsEngine._step (babylon.max.js:36315)
at Scene.render (babylon.max.js:21270)
at main.js:847
at Engine._renderLoop (babylon.max.js:8509)
What do I wrong? Ho can I do this?