Open gomutako opened 1 month ago
How exactly these would behave is very game specific; I don't think it makes sense to support this type of "collision" directly in the engine.
Without thinking about it too much, here's how I would do it:
ladder
and position it to cover the graphics.player->check_against = ENTITY_GROUP_ITEM
, ladder->group = ENTITY_GROUP_ITEM
. player->touches()
check for other->type == ENTITY_TYPE_LADDER
and set a flag self->player.on_ladder = true
player->update()
check for this flag and change the behavior accordingly. E.g. self->gravity = 0
, set self->vel.y
on up/down arrow.
Hi,
Any plans to add support for old school ladders? I mean like these ones
I've tried to add support modifing the collision map but it's just buggy and not that fluid.
I'm in love with your work! Thanks for sharing it