GoodOldSnoopy Posted August 31, 2017 Share Posted August 31, 2017 So I have two sprites. One eats the other sprite. I've setup an overlap method game.physics.arcade.overlap(playerFish, smallerFish, this.collisionHandler, null, this); So when the bigger fish collides with the smallerfish the smaller fish dies and the bigger fish fires an animation, like so: collisionHandler(body1, body2) { const runAnimTest = playerFish.animations.play('eat', 10, false); body2.kill(); runAnimTest.onComplete.add(() => { playerFish.animations.play('swim'); }, this); } Basically, i kill the enemy sprite (body 2) and trigger eat animation on the fish sprite then oncomplete trigger the default swim animation. Question, how/can I set the collision bounds on a sprite? So the eating animation triggers earlier so it looks more realistic at the moment the animation triggers too early and the animations look awful. Thanks Link to comment Share on other sites More sharing options...
samme Posted August 31, 2017 Share Posted August 31, 2017 examples/v2/search?search=bounding+box Link to comment Share on other sites More sharing options...
Recommended Posts