deedeekaka Posted July 19, 2016 Share Posted July 19, 2016 Hello, I've been following a Phaser spring example and I've been trying to remove the overlay sprite it draws on my circular physics body (I assume it adds this when I call body.setCircle(5)). Does anyone know how to remove this? I don't want to remove the body, I still want the physics, I just don't want the extra debug drawn sprite. Thanks Link to comment Share on other sites More sharing options...
rich Posted July 20, 2016 Share Posted July 20, 2016 Phaser won't draw debug bodies automatically unless instructed to - you control this by setting the 'debug' flag when the body is enabled: game.physics.p2.enable([ contra, bunny ], true); Here we enable a P2 body, with debug, on two Sprites. Change the 'true' to 'false' (or just remove it) and they won't have debug bodies. deedeekaka 1 Link to comment Share on other sites More sharing options...
deedeekaka Posted July 20, 2016 Author Share Posted July 20, 2016 11 hours ago, rich said: Phaser won't draw debug bodies automatically unless instructed to - you control this by setting the 'debug' flag when the body is enabled: game.physics.p2.enable([ contra, bunny ], true); Here we enable a P2 body, with debug, on two Sprites. Change the 'true' to 'false' (or just remove it) and they won't have debug bodies. Thanks a ton! Link to comment Share on other sites More sharing options...
Recommended Posts