Need help on animation

Updated on March 15, 2019 in [A] Animation
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
3 on March 14, 2019

So, i’m currently following a tutorial about how to make a 2d game. And i have several questions.

1. When i try to walk / run, the character suddenly rotating by itself for no reason. I’ve tried to fix that by checking the freezing Z rotation on Rigidbody 2D. However, when i try to play it again, sometimes my character’s feels like “stuck” on something. And there’s no other object in front of him. How to fix this problem?

2. When i’m doing a “free fall”, the character (jumping animation) keeps playing (looping). How to freeze 1 frame (on “falling” frame) so it won’t keep playing (looping) until i hit the ground?

Sorry for my bad english.

  • Liked by
Reply
1 on March 14, 2019

Do you have Apply Root Motion checked on your animator component?

For looping (or not looping), click on your Animation Clip and uncheck “Loop Time” if you want the animation to play once and then stop. It will freeze on the last frame until the Animator tells another clip to play, (or replay).

on March 15, 2019

Do you have Apply Root Motion checked on your animator component?From Mouledoux

 No.

 

Also, I’ve tried to change the collider into Edge collider and it’s fixed the problem. However, sometimes the jumping animation is playing by itself even when I’m not jumping (still on the ground).

Show more replies
  • Liked by
Reply
Cancel
0 on March 15, 2019

Nvm. Fixed that by reducing radius on my character collider.

 

  • Liked by
Reply
Cancel