Hello! If this is your first time reading about my thirty day developer challenge, click here to go to the first post!
So I had to ditch the old physics engine (Phaser's Arcade) because I think if I want to do collision detection for objects that aren't just rectangles, I need to use an engine that is a bit more powerful. Hence I spent the past two days learning about the P2 physics engine built into Phaser.
With this new engine, I was able to do proper collision detection between two circular objects. Now if you throw the pink ball at the black round corner, it'll detect when the edges of the two circles meet. Before, there was an invisible box that surrounded each circle so collisions would occur even if visually they did not. (Which leads to a bad gaming experience of course).
On a side note, try it out at this link and let me know how smooth the collision detection is!
On a side side note, sorry I didn't publish a post yesterday! I want to say I forgot, but the truth is that I was just too lazy.
Comments
Post a Comment