Ad4m Posted March 19, 2017 Share Posted March 19, 2017 I created a Texture Atlas using SpriteSheet Packer and I thoght it will crop the sprites but when i debug it showing the bounds i get what you can see in one of the pics attached, but when you look at the texture file the sprites are cropped, I dont know if that's a problem with frame dimensions in the json definition or not. Is there a way to do that without editing all the images to the proper dimensions? Link to comment Share on other sites More sharing options...
Ad4m Posted March 20, 2017 Author Share Posted March 20, 2017 You can see what i meant above here https://n3s7or.github.io/DoGGer/ Link to comment Share on other sites More sharing options...
jonteferm Posted March 20, 2017 Share Posted March 20, 2017 1 hour ago, Adam West said: You can see what i meant above here https://n3s7or.github.io/DoGGer/ You can set the size of the sprite body - if that is what you are after. sprite.body.setSize(width, height, offsetX, offsetY) https://phaser.io/examples/v2/arcade-physics/offset-bounding-box Link to comment Share on other sites More sharing options...
samme Posted March 20, 2017 Share Posted March 20, 2017 You can try setting all trimmed to false in https://n3s7or.github.io/DoGGer/imgs/player.json (and reload). Link to comment Share on other sites More sharing options...
Ad4m Posted March 21, 2017 Author Share Posted March 21, 2017 That worked perfectly @samme, i will take a look at what you said anyway @jonteferm. Thks both for the answer. Link to comment Share on other sites More sharing options...
Recommended Posts