Psychic_Supernova

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Psychic_Supernova

    Sprite and physics body seem to be in two different locations

    Since Phaser 3, there is the Phaser.physics.arcade.body.syncBounds Boolean property. Setting this to True will align the physics body bounds to the visual bounds the associated image. syncBounds :boolean Whether to automatically synchronize this Body's dimensions to the dimensions of its Game Object's visual bounds. Type: boolean Since: 3.0.0 Default Value: false Source: src/physics/arcade/Body.js (Line 682) See: Phaser.GameObjects.Components.GetBounds#getBounds From: Phaser 3 Documentation on Photonstorm's GitHub