gondai Posted March 13, 2015 Share Posted March 13, 2015 i have create mini game with collision system on it. the game about the ball bouncing on moveable player's box. all code is working well. the problem is while i move the box and hit the ball it become faster. i want the speed stay as it what ever happen to the ball. here is my code:game.physics.arcade.enable(box);game.physics.arcade.enable(ball); box.body.immovable = true; box.anchor.setTo(0.5, 0.5); ball.anchor.setTo(0.5, 0.5); ball.body.collideWorldBounds = true; ball.body.bounce.setTo(1, 1);ball.body.velocity.setTo(150, -150); this http://phaser.io/examples/v2/arcade-physics/bounce-knock as reference, try to push the ball using the alien, it is what i mean by the speed is changing. Link to comment Share on other sites More sharing options...
crouzilles Posted March 18, 2015 Share Posted March 18, 2015 I am also looking for an answer to this problem, and not being particularly mathematically oriented, I am finding it very difficult to come up with a solution. If you find a solution, please share. RegardsCrouz Link to comment Share on other sites More sharing options...
Recommended Posts