guddy Posted August 13, 2014 Share Posted August 13, 2014 Hi,I have add p2 physics to the sprite .But my sprite floating in air ,is not still in one place .I have use sprite.body.setZeroDamping(); sprite.body.fixedRotation = true;but it not working my code this.image = 'block'+this.Level1[pos]; this.cow = configObj.game.add.sprite(this.Xpos[pos], this.Ypos[pos], this.image); configObj.game.physics.p2.enable([this.cow]); this.cow.body.setZeroDamping(); this.cow.body.fixedRotation = true; this.cow.inputEnabled = true; this.cow.events.onInputDown.add(this.mouseDownCallBack, this); this.cow.events.onInputUp.add(this.mouseUpCallBack, this); Link to comment Share on other sites More sharing options...
Recommended Posts