Collision detection between a sprite and rectangle in canvas
- by Andy
I'm building a Javascript + canvas game which is essentially a platformer. I have the player all set up and he's running, jumping and falling, but I'm having trouble with the collision detection between the player and blocks (the blocks will essentially be the platforms that the player moves on).
The blocks are stored in an array like this:
var…