Death animation issue

I want my character to just fall to ground with an animation that I got; however, I currently have an issue where he is pushed off ledge by enemy and then the running animation starts up. I would like to turn off collision but this makes him fall through the tilemap. A little bit lost here.

Hi Jesus,

First of all, you need a condition. For our other animations, we check, for example, if the player is touching the “Climbing” layer. If you want to play an animation while he is falling, you have to define what “falling” is. Is “falling” “not touching the ‘Ground’”? Are there more conditions?

And once you defined what “falling” is, you could play your animation like you played the other animations. And you could turn off the collision by disabling the collider. The only problem is: If you disable the collider, the player won’t be able to know if he touches the ground. Disabling the collider makes sense for a player falling “forever”, e.g. like falling into a bottomless hole.

If necessary, comment out your other code and try to make the falling animation play in certain cases. Then readd the other code. If the falling animation suddenly does not get triggered anymore, all you have to figure out is what other conditions are preventing the code block from being executed. Then you adjust the conditions, and your animations should work. :slight_smile:

Please feel free to ask our helpful community of students for further advice/ideas over on our Discord chat server.

Good luck!


See also:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms