game-programming-patterns-demo icon indicating copy to clipboard operation
game-programming-patterns-demo copied to clipboard

[Fix] Fixed bug in JumpState's Execute function

Open TaeRaeKim opened this issue 1 year ago • 0 comments

Fixed JumpState Bug

The state should transition to WalkState when the velocity value is greater than 0.1f, otherwise it should transition to IdleState.

Before modification

Simply jump in place

jumpToIdle

  • Expected : JumpState -> IdleState
  • Actual : JumpState -> WalkState -> IdleState

When moving after landing

jumpToWalk

  • Expected : JumpState -> WalkState
  • Actual : JumpState -> IdleState -> WalkState

After modification

States transition correctly

afterFix

TaeRaeKim avatar Jan 18 '25 15:01 TaeRaeKim