Fixed a bug in the 2d camera platformer example (#2687)
canJump used to alternate between true and false when on ground
This commit is contained in:
parent
f4b4054de5
commit
ee5a87826d
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float d
|
|||
ei->rect.x <= p->x &&
|
||||
ei->rect.x + ei->rect.width >= p->x &&
|
||||
ei->rect.y >= p->y &&
|
||||
ei->rect.y < p->y + player->speed*delta)
|
||||
ei->rect.y <= p->y + player->speed*delta)
|
||||
{
|
||||
hitObstacle = 1;
|
||||
player->speed = 0.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue