Additional hit areas

Hi. Players are created via:
self.player = self.physics.add.sprite(playerInfo.x, playerInfo.y, ‘ship’)

The player’s body collides correctly. How would I go about adding an additional hit area for the player’s weapon area so that the weapon can overlap other objects while the body still collides? Thanks.

Ok, I’m brand-new to Phaser myself, so take this with a pinch of salt :slight_smile:

Have you considered a seperate sprite for the weapon? You could have the weapon move with the player by setting its position within the Scene update method, something like so:

weapon.body.x = player.body.x + someOffsetX;
weapon.body.y = player.body.y + someOffsetY;

yeah that’s exactly what I’m looking for. Thank you.