2D-Animation icon indicating copy to clipboard operation
2D-Animation copied to clipboard

Crouching and jumping not working right

Open zach-lawrence-1 opened this issue 5 years ago • 8 comments

Crouching is constantly being turned on and off and the animation is looping from crouching to idle over and over. Also jumping animation doesn't play unless I'm already in the air and press space when it should activate when I am not touching the ground.

zach-lawrence-1 avatar Jun 07 '19 13:06 zach-lawrence-1

Did you ever resolve this? I have the same issue

imprisonedmind avatar May 27 '20 17:05 imprisonedmind

Yes, but I can't remember how because it has been almost a year. I'll try to look at my old project if you want. Reply back if you want me to look at it

zach-lawrence-1 avatar May 27 '20 17:05 zach-lawrence-1

I managed to find a fix in one of the pull requests. Thanks for the reply.

imprisonedmind avatar May 27 '20 18:05 imprisonedmind

How did you fix the Crouching animation?

Ne9nX avatar Dec 02 '20 21:12 Ne9nX

I think I looked through the pull requests and found a change at the code, Sorry it was long ago I am not sure now

imprisonedmind avatar Dec 03 '20 20:12 imprisonedmind

Has anyone found the actual solution t o this yet? if so, could you please link it, thanks!

AlfrogKun avatar Mar 14 '22 18:03 AlfrogKun

i have got a problem with the jumping.

crouching is fine but it will only play my jump animation fully when i press space while in the air; however my jump animation is visible for several frames when space is pressed while on the ground before returning to my run, or idle animation.

my guess is that it's probably detecting a collision before fully clearing the floor therefore triggering this bit of code: public void public void OnLanding () { animator.SetBool("jumping", false); } early!

OnesAndZeros0009 avatar Dec 19 '22 09:12 OnesAndZeros0009

however I have spent the good part of two and a half hours trying to fix it but have failed!

I am new to unity and don't know if there is a simple fix to this.

OnesAndZeros0009 avatar Dec 19 '22 09:12 OnesAndZeros0009