I couldn’t figure out how do I make my character (player) play a balancing animation when it’s standing on the edge of the platform, Like it does in Sonic games & in Super Smash Bros Games? I tried using the grab platform ledges thing, But It couldn’t do it right. How can I do that.
Here are some of my characters collision marks & points for some better understanding.
Hi, firstly it’s strange that you are using a different collision box for the character when they’re balancing off a ledge, because that might cause them to fall off later. Consider making it use the same one as standing.
Anyway, I think you can achieve it by the position of the player and the width of the platform.
Add a condition to check if the character is on / colliding with platforms & standing (not moving, in air, etc).
Add another condition to check if the character’s X position is less than the platform’s X positon - (player’s width / 2) OR* more than (platform’s X position + platform’s width - (player’s width / 2)).
Use the blue sigma Σ button to help you.
Good luck!
But now I need to think how am I gonna do the same thing when the player is on the edge & is facing right. I’m also using the TiledSprite is a test platform. Any more things I need to do?
ah, sorry! I made a mistake on the second condition.
It should be:
player X position more than TiledSprite X position + TiledSprite width - (player width
/ 2)
Note the minus sign.
Hope it works.
For facing right animation, if you are using different animation, there might be a condition to check which way thecharacter is facing in the Platformer behaviour. Not sure what it’s called