Hi everyone,
Please see here: https://playground.babylonjs.com/#Z8HTUN#1337
I am still chasing why this is possible** in my local project (obviously there should not be a call to anything after the body has been disposed). But I do not think Babylon should crash like that. Particularly, if the the calling code runs in a render loop observable, the entire app crashes ![]()
User hotfix would be try/catch and/or if( PhysicsBody.isDisposed )
Best wishes
Joe
**Babylon does auto-dispose a physics body that is attached to the disposed mesh. The disposal happens indirectly in PhysicsEngineComponent.ts via a Object.defineProperty(TransformNode.prototype, "physicsBody",..) and there via an onDispose observable. Thumbs up to Codex.