[SOLVED] 2d character animation bugging
Hello everyone, I have a weird problem and really need an urgent help in the matter. I have been going around it back and forth, googling it but nothing really helped. I have set up a 2D character, put the animations and wrote the scripts for idle, walk, and jump. The problem I'm having is whenever I jump and land on a certain platform in the game, the animation of the character gets stuck on the walking animation (looping forever) and cannot move or jump again.
Here is an example:
tried adding maybe a Physics2D Material to that platform's collider.
tried adding some condtions in if-statements to perhaps limit/restrict animations but didn't work either.
What I want to do is to make the character jump normally and does not get stuck in place and/or animation loop.
Also for reference, here is both of my used scripts: Player Movement Script:
https://pastebin.com/aHkNAXam
Player Attack Script:
https://pastebin.com/SZT1gKEv
The inspector of the game object that character/animation get stuck on:
The Animator of the character:
Your help is much appreciated and would be really grateful!
Answer by jackblue2009 · Dec 27, 2017 at 04:00 PM
Never mind, just figured out the problem! Apparently that floating platform was on a different layer from the ground. So I set it to the same layer, and it works better now!
Your answer
Follow this Question
Related Questions
How can I improve this code? 1 Answer
Play animations not included in the animator. 0 Answers
Take damage only when attack animation is done? 1 Answer
animation scirpting 1 Answer
Thirdperson open doors 0 Answers