Hi! I have created Phaser.Physics.Arcade.Sprite with dynamic body attached and I’m struggling with its behaviour. On the figure nr.1 below, there is freshly instantiated sprite with body debug rectangle. You can see it works perfectly. After the instantiation I call this code in order to flip sprite:
sprite.setOrigin(1, 0.5);
sprite.flipX = true;
As you can see on figure nr.2, sprite flip works okay, but the position of the body is not updated at all. I thought that dynamic body reacts on parent’s sprite changes, so when I change anchor on the sprite and flip it, it should affect also the body and re-position properly, but as you can see, this is not the case.
Is this correct behaviour? If so, what is the proper way to adjust physics body after sprite origin change?
Thanks in advance!