jbwilhite Posted March 29, 2014 Share Posted March 29, 2014 Hi,I am trying to replace a standard sprite sheet in my game with a json atlas, but I am getting error when I try to access the body element of the sprite. I couldn't find anything in the examples or on the forum about this. The sprite works fine with a plain png spritesheet. function preload() {game.load.atlas( 'atlas', 'assets/player.png', 'assets/player.json' );} function create() {player = game.add.sprite(32, 32, 'atlas');player.body.collideWorldBounds = true; //error here} Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts