playif / play_phaser

A Dart port for Phaser 2D game engine.
MIT License
72 stars 13 forks source link

physics.enable on Sprite with child/Group give RangeError #21

Open MauroMombelli opened 9 years ago

MauroMombelli commented 9 years ago

easy step to reproduce:

//create shadow
this.shadow = game.add.sprite(x, y, 'tank', 'shadow');
//then the tank body
this.tank = game.add.sprite(x, y, 'tank', 'tank1');
//attach shadow to tank, so they will move togheder
tank.addChild(shadow);
//now activate physics!
game.physics.enable(tank, Physics.ARCADE, false); // <-- it break the engine!