Need help with character behaviour - platformer


  • Posts: 4
Hi there
I am making a platformer and need a help with how to setup character behaviour when there is a place where my hero needs to swim through water. How could swimmig be simulated ?


  • Posts: 29
I think you can do this by changing the animation of the actor to a swimming animation when the actor collides with the water. Then make the actor fall down slower than he does in land.

You might have to make adjustments to your other behavior if you want to use the jump button to move up when you're in the water.


if (jumpkey is down) and not (swimming)
jumping code
otherwise if (jumpkey is down) and (swimming)
swimming code