Hitbox stuck one pixel below surface of tilemap

  • Hello! I found an...interesting issue.

    I'm not sure what I changed to make this happen but midway through working on this game I realized this was happening: 0_1532649797654_49e1243f-690a-4b4c-96dc-2646c1a16fc7-image.png

    From there it looks subtle, but the hitbox is one pixel too far into the ground. But unlike what I'd expect, this does not impact movement at all -- the player can still move and jump and everything, mobility hasnt been limited at all.

    The other weird thing is, this hitbox issue only happens when I'm standing on my gridmap. When I'm standing on another entity (like the dirt block pictured), that issue doesnt happen (note the lil pixel-sized legs visible when the bug is standing on the dirt block)
    0_1532649902718_c6a63603-192b-4b3d-b047-681a74557810-image.png 0_1532649937234_93c9304a-64fb-4951-92d0-fa4d38e16a3b-image.png

    I have no idea what's happening here! I've looked through all my code, I've commented all my setHitbox calls except for the one setHitbox at initialization. No dice.

    More info: the player is 16x16, the dirt block is 20x16, and the grid tiles are 16x16.

    @bendmorris do you have any idea what could be causing this?

  • This post is deleted!

  • This post is deleted!

Log in to reply

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.