Jump to content

Issue with Sprite vs Sprite collision - Phaser 1.1.4


Recommended Posts

Hello everybody,


I have an issue with a Sprite vs Sprite collision (Phaser 1.1.4 - Master branch).

I don't know why but my player only collides with the bottom of the rock.


You can see the problem here : http://folia-game.herokuapp.com/index-dev.html


The 2 scripts involved are player.js and rock.js (you can see the code with your developer tools too).


The rock is immovable and I call the "game.physics.collide()" in the update function of Rock (in rock.js).


As you can see on the image below, my player has a specific bounding box (done with the sprite.body.setRectangle() function).




I tried but I can't figure it out. Please, help me :)


Thank you.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...