mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
Fix Planck debug draw: add camera sync and hide sensors like Box2D
This commit is contained in:
parent
955179eec9
commit
d584065757
6 changed files with 109 additions and 18 deletions
|
|
@ -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)
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue