melonJS: Entity and solid block on collision layer

Posted by Arthur Halma on Game Development See other posts from Game Development or by Arthur Halma
Published on 2012-10-10T13:02:45Z Indexed on 2012/10/10 15:55 UTC
Read the original article Hit count: 155

Filed under:

Actually I have my player entity with 64x64 sprite animation and 18x60 hitbox also the map is maded by 16x16 tiles. When my player goes some way he can pass through blocks (but not all of them). For example there are 4 situations:

Good (player can't pass the tile with isSolid property on collision layer)

enter image description here

Good (player can't pass the tile with isSolid property on collision layer)

enter image description here

Bad (player pass the tile with isSolid property on collision layer)

enter image description here

Bad (player pass the tile with isSolid property on collision layer)

enter image description here

Looks like melonJS checks only corners of hitbox instead of whole rectangle. Can anyone help me in this situation.

© Game Development or respective owner

Related posts about framework