Jump to content

debug body green square disappears in some parts on the screen


Mike018
 Share

Recommended Posts

I've made a simple sprite and enabled arcade physics, but for some reason, when I debug the body of the sprite, the green square only displays on the top left of the screen. When I drag it around anywhere else, the green square disappears, yet collisions still register. Any ideas why this is happening?

create() {

    this.pet2 = this.game.add.sprite(
      this.game.world.centerX,
      this.game.world.centerY,
      'atlas1',
      'pet2'
    );
    this.game.physics.enable(this.pet2, Phaser.Physics.ARCADE);
    this.pet2.inputEnabled = true;
    this.pet2.input.enableDrag();
}




render() {
    this.game.debug.body(this.pet2);
  }

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...