All examples · Physics · As Markdown, for AIs

Platformer in the 2D world

What this example shows

useCharacterBody2d is the same character as useTileBody2d, still moved exactly as fast as the game says, but in the 2D world of installPhysics2d: the map's tiles become the world's walls, ledges and slopes, the bridge is nine planks joined by useJoint2d hinges that sag under its weight, and it pushes the crates it walks into.

← → walk, Z jump. C drops crates onto the bridge. B lets one hinge go and the bridge parts, hanging from both banks.

Starting
Starting
—