I have the following "game":
function update() {
coyote.applyForce(gravity);
coyote.edges();
coyote.update();
cactus.update();
if (coyote.intersects(cactus)){
alert("colision");
}
}
the problem is that when coyote jumps, the div increase its size and there are some blank spots that cause collision too.
Is there any way to improve the collision detection? I have tried to implement inner hitbox but I didn't figure out how to.