Mike018 Posted April 4, 2017 Report Share Posted April 4, 2017 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); } Quote Link to comment Share on other sites More sharing options...
samme Posted April 5, 2017 Report Share Posted April 5, 2017 Make sure you set body.moves = false while dragging (or always). I couldn't reproduce the problem: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.