I started a new game to learn about platforms.
Well, how do I make it so my platformer can swim?
So I make it a sprite called water
Add something like he falls down a little deeper every second when touching the water.
Pressing an up button would make him swim upward.
Pressing a down button would make him swim downward.
Left and Right would still be side to side.
How would I code this?
Maybe water won't have any behavior.
Maybe set the player gravity to (normalgravity/2) when touching the water? I think this will possibly make him fall slowly.
Maybe something like increase the y by vector 10 or something so it's like he swims upwards.
Is there a better way to code this?