Player transitions between fundamentally different movement configurations during play, each with distinct physics.
The player swaps movement modes with distinct physics — a slow walk and a fast vehicle.
Switching isn't loading a new character — it's enabling one physics configuration and disabling another while keeping the same world position.
A mode flag (ON_FOOT / IN_TANK) decides which physics and input branch runs this frame. One variable gates the whole behavior split.
enum Mode { ON_FOOT, IN_TANK }
var mode = Mode.ON_FOOT
func _physics_process(d):
match mode:
Mode.ON_FOOT: walk(d)
Mode.IN_TANK: drive(d)Give each mode its own body with its own SPEED/ACCEL/gravity tuning. The active one processes; the other sleeps at the shared position.
func enter_tank():
$Tank.global_position = $OnFoot.global_position
mode = Mode.IN_TANKA parent that holds both vehicle scenes. Toggle visibility and processing so only the active configuration is live.
$OnFoot.set_physics_process(mode == Mode.ON_FOOT)
$Tank.set_physics_process(mode == Mode.IN_TANK)In short: Multiple CharacterBody2D setups or mode enum; active mode controls which physics/input code runs
9 catalogued game(s) use this mechanic, spanning 1988–1996.
▶ Explore Vehicle Switching interactively — see every game + the Godot system