Chendler Posted September 3, 2014 Share Posted September 3, 2014 Hello, comunity and Richard. When I create my player, I use the follows code: creature = game.add.sprite(-500, -500, 'hero', 2, group);game.physics.enable(creature, Phaser.Physics.ARCADE);creature.body.gravity.y = 500;creature.scale.set(xFactor, yFactor);creature.body.offset.x = creature.body.width - creature.body.width * 0.8;creature.body.width = creature.body.width * 0.8;After creature.scale.set() phaser immedeately change creature.width, but doesn't change creature.body.width.Then I change my creature.body.width to needed value, but after first update() run phaser set creature.body.width to updated creature.width. How I understood, it's because phaser update physics after each update() iteration. Is it normal behavior? Link to comment Share on other sites More sharing options...
lewster32 Posted September 3, 2014 Share Posted September 3, 2014 You need to set the body size with body.setSize otherwise you will run into problems such as this. Link to comment Share on other sites More sharing options...
Recommended Posts