gikdew Posted April 20, 2014 Share Posted April 20, 2014 Test -- https://dl.dropboxusercontent.com/u/122460797/game3/question/index.htmlAs you can see in the test, the phyisics are working, since the physics debug square is appearing in both objects, (use the arrows to move), but when both sprites collide, nothing happens, (it should appear a log on the console), here the code that I use for colliding both sprites! this.game.physics.arcade.collide(this.mancha.sprite, this.player.sprite, function() { console.log("Colliding"); this.player.animationDie();}, null, this);I used this before and it worked, I don't know what is happening right now! (If you want to read some of the code use Ctrl+U, and check it) EDIT: The collision works when you collide on the left side... I dont know why! LOL! Link to comment Share on other sites More sharing options...
gikdew Posted April 20, 2014 Author Share Posted April 20, 2014 I solved my problem with a manual overlap function, that checks the intersection of the sprites.. Link to comment Share on other sites More sharing options...
gikdew Posted April 21, 2014 Author Share Posted April 21, 2014 Ok, for moving the oil spots I used sprite.y++; What I have done is substitute that for sprite.body.velocity.y = 100, and that solved the problem! Link to comment Share on other sites More sharing options...
Recommended Posts