Skip to content

Commit

Permalink
- Fixed bug with coyote time enabling double jump
Browse files Browse the repository at this point in the history
  • Loading branch information
DiogoDeAndrade committed Feb 19, 2024
1 parent 74fba92 commit 7ceddd1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Assets/OkapiKit/Scripts/Movement/MovementPlatformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ void Jump()
{
rb.velocity = new Vector2(rb.velocity.x, speed.y);
jumpBufferingTimer = 0.0f;
coyoteTimer = 0;
jumpTime = Time.time;
currentJumpCount--;
}
Expand Down Expand Up @@ -694,6 +695,14 @@ void UpdateGroundState()
isGrounded = true;
return;
}
else
{
actualIsGrounded = false;
if (rb.velocity.y > 0)
{
coyoteTimer = 0;
}
}
}

if (actualIsGrounded)
Expand Down
4 changes: 4 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## V1.11.3

- Fixed bug with coyote time enabling double jump

## V1.11.2

- Can now build games made with Okapi Kit
Expand Down

0 comments on commit 7ceddd1

Please sign in to comment.