mm Posted October 6, 2016 Share Posted October 6, 2016 Hi, just upgraded from phaser 2.4.4 to 2.6.2 and I'm having trouble with sprites bodies. My sprites are set to an anchor of x 0.5 and y 0.5, the body was also being set at that position on 2.4.4 version but after updating the body doesn't change position when changing the anchor. Is there any way to move the sprite body to the center of the sprite? Thanks. Link to comment Share on other sites More sharing options...
rgk Posted October 7, 2016 Share Posted October 7, 2016 Yes, use http://phaser.io/docs/2.6.2/Phaser.Physics.Arcade.Body.html#setSize For example this will center the body: spite.body.setSize(100, 200, -50, -100); Link to comment Share on other sites More sharing options...
Recommended Posts