Offset hitbox of container

Hi,

I’m struggling to achieve fit hitbox of container. I got two spritesheets of player and sword, I put those two sprites into one container

this.sprite = scene.add.sprite(0, 0, 'player', 0);        
this.sword = scene.add.sprite(0, 0, 'sword', 0);
this.container = scene.add.container(x, y, [this.sprite, this.sword]);
this.container.setSize(4, 8);
scene.physics.world.enable(this.container);

It works like a charm and holds those two sprites together, but the problem is that hitbox is inaccurate. Previosuly when I was using sprite instead of container, I was using .setOffset() method to move the hitbox, but this method is not available on container.

Here you can see how the hitbox is looking:
image
What I want achieve is to move hitbox a few pixels down.

How can I move this hitbox of the container? Is there any method on container similar to .setOffset()?

It’s container.body.setOffset().

Oh my! That’s it, I was looking for it on body, but Typescript was telling me that there’s no such method. :frowning:
image

Anyway, that solves my problem! Big thanks!