Fix Planck debug draw: add camera sync and hide sensors like Box2D

This commit is contained in:
Karl Pannek 2025-07-16 21:15:37 +02:00
parent 955179eec9
commit d584065757
6 changed files with 109 additions and 18 deletions

View file

@ -32,6 +32,11 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, nc, reque
Parent.call(this, options);
// Set reference to this GameController in the physics engine for camera access
if (this.physicsEngine && this.physicsEngine.setGameController) {
this.physicsEngine.setGameController(this);
}
this.ncTokens = this.ncTokens.concat([
nc.on(nc.ns.client.game.gameStats.toggle, this.toggleGameStats, this)
]);