Katod Posted September 28, 2016 Share Posted September 28, 2016 I have a sprite with anchor set to .5/.5. When player jumps it texture changes to a wider image, but colliding box remains the same - that is desired behavior. What the problem is that it's being aligned to the corner of new sprite, while I need it being in the center of it. How can I center colliding body box inside new sprite? Link to comment Share on other sites More sharing options...
samme Posted October 4, 2016 Share Posted October 4, 2016 If you can, try to combine all the sprite images into a single texture (spritesheet). That makes it easier and will improve performance. Otherwise, you can call body.setSize to place the body manually or try this hack: body._sx = 0; body._sy = 0; body.updateBounds(); Link to comment Share on other sites More sharing options...
Recommended Posts