Skip to content

Fixed a bug in the 2d camera platformer example#2687

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
skylar779:master
Sep 4, 2022
Merged

Fixed a bug in the 2d camera platformer example#2687
raysan5 merged 1 commit into
raysan5:masterfrom
skylar779:master

Conversation

@skylar779
Copy link
Copy Markdown
Contributor

canJump used to alternate between true and false when on the ground.
When using IsKeyPressed instead of IsKeyDown for jumping, the player might not jump due to that behavior. This behavior got fixed by adjusting the condition for checking if an obstacle is being hit. With this change, canJump doesn't alternate between true and false when the player is on the ground and instead stays on true.

canJump used to alternate between true and false when on ground
@raysan5 raysan5 merged commit ee5a878 into raysan5:master Sep 4, 2022
@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Sep 4, 2022

@skylar779 Good catch! Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants