ssatguru / BabylonJS-CharacterController

A CharacterController for BabylonJS
Apache License 2.0
216 stars 46 forks source link

Multiple Jump and Reset animation #14

Closed dad72 closed 4 years ago

dad72 commented 4 years ago

Hi,

  1. When you hold down the space bar, the jump is performed several times. Shouldn't it be done only once, even if you hold down the space key?

  2. In addition, if I press Z + Shift to run and release both keys at the same time, the character walks without any keys activate. The reset was not done completely

ssatguru commented 4 years ago
  1. "jump is performed several times" - Yes that is by design but we can change this. Let me look into what is the "standard" convention.
  2. did you try with the latest code? Now that we are using "e.key" , pressing shift changes the case to uppercase - "z" becomes "Z"!. I put in fix for this https://github.com/ssatguru/BabylonJS-CharacterController/blob/master/src/CharacterController.ts#L910
dad72 commented 4 years ago

Yes, point 2 is correct, I no longer have this problem.

I'm waiting for your feedback on point 1. But it seems better to me to click the space bar once if we want to jump again rather than to stay pressed.

ssatguru commented 4 years ago

Agreed, I have updated to just jump once when space is pressed. To jump again press space again.

dad72 commented 4 years ago

OK, thanks.