I faced several issues related with physicsBody collision event listeners. I prepared 3 playgrounds with detailed comments and console logs. Each playground shows exactly 1 issue.
I assume that these are bugs. But probably I am just don’t understand how it should be in proper way. That’s why I am creating topic in ‘Questions’ section.
bullet.physicsImpostor.physicsBody.removeEventListenerdoesn’t actually remove event listener.
Inside event listener there is no way to get a mesh to which physicsBody was assigned to. I invented some hack for this, but why it is not inside Babylon already?
When we want to destoy mesh and it’s physicsImpostor after hit, the engine crashes with error
Cannot read property '_wakeUpAfterNarrowphase' of undefined. Probably I am missing something before calling
dispose(), but I don’t know.
“Sorry, new users can only put 2 links in a post.”
[same as above]ZDTTQQ#2