Creating a platform game with realistic scales.
Yes, I know, this subject has been reviewed many times and yet I haven't found anything that suits me, even the platform example provided doesn't suit me at all!
When my character is on the ladder, then, he can move right, left, up to go up the ladder and down to go down.
Ok, well, that's easy, you might say, "platform" behavior and possibly "8-directions", but when the player touches the ladder, we disable "platform" behavior and enable "8-directions", and vice versa, when the player is no longer in collision with the ladder, we enable "platform" behavior and disable "8-directions"!
Well, yes, but no!
When you jump to climb the ladder if it's high up, as is my case here, when you deactivate the "platform" behavior, it will retain this jump, and when you no longer touch the ladder, it will resume its jump.
Well, it's not that complicated, you'll tell me: when the player touches the ladder, the jump force is set to 0, and conversely, when the player no longer collides with the ladder, the jump force is reset to what it was before!
Well yes, but no!
No change at all!
Well then, we'll just set gravity to 0 when the player touches the ladder, and put it back to what it was before when he no longer touches it!
Well yes, but no!
The player will gradually fall off the ladder, and you won't be able to jump off it!
And with conditions if you press up, down, left, right?
Surely you could do it, but then you'd have to disable the default behavior...
A ladder behavior wouldn't be so bad, would it? ^^
There's no point, you can already do it, you'll tell me!
In short... I'm looking, but haven't found it yet, so it's not as simple as you'd expect!