# Character Push a character shoves what it walks into, as hard as you say. ```{raw} html ▶ Run in browser ``` **Tags:** `physics` `3d` `character` A character body is position-driven, so nothing about the collision itself moves what it walks into. ``push_factor`` is the knob that turns the block into a shove, and it ships ON at ``1.0``: walk into a crate and the crate goes. Godot's character body and Unity's stock controller leave this to the game; Unreal pushes out of the box, and so do we. The impulse per blocking contact is ``push_factor * (M * m / (M + m)) * approach_speed``, ``M`` being the character's ``mass`` and ``m`` the mass of what it hit. That middle term is the pair's reduced mass, and times the approach speed it is the arrest impulse of a perfectly inelastic collision -- which is exactly why ``1.0`` is safe to ship: one contact hands the crate ``M / (M + m)`` of your approach speed and never more, so at the 1 kg character here the 1 kg crate leaves its first contact at 2.00 m/s of a 4 m/s walk and the 200 kg one at 0.02 m/s. That is a bound per contact, not a speed limit: catch a light crate up, hit it again, and the kicks stack -- the 1 kg one tops out at 5.15 m/s over the walk below. Set the factor to ``0`` for the pure block; the floor under your feet is exempt at any setting, so jumping onto a crate never drives it into the ground. The character here weighs 1 kg rather than the 70 kg default, because what a crate takes is ``M / (M + m)`` of the approach speed and a light character is what makes three crates of different mass react three different ways. Walk along the row and watch them: a second and a half of walking at the default sends the 1 kg crate 4.16 m, touching it on only 14 of those 90 frames because it skitters ahead and you have to catch it up; carries the 20 kg one 2.17 m over 44 frames of contact; and moves the 200 kg one 0.03 m while you lean on it for 76, which is a shrug. Drive into the wall instead and nothing happens at all, to the wall or to the character: an immovable body has no finite mass to share, so the push skips it. The stack at the far end has been left alone long enough to fall asleep. Sleep is per island, so shoving the bottom crate wakes the whole stack rather than sliding one crate out from under two that stay put. Shows: - ``CharacterBody3D.push_factor`` and ``.mass``: the whole feature, and the factor's ``1.0`` default. - The knob read PER MOVE, not frozen at enter-tree: the +/- keys change it mid-walk, like a "carrying something heavy" state would. - Mass on both sides of the contact deciding the outcome. - Floor contacts exempt: standing on a crate imparts nothing to it. - ``collisions``: the blocking contacts, still handed back, so a game can add physics of its own on top (here: a readout of what was hit last move). Controls: W A S D - walk the character (arrows also work) Space - jump (land on a crate: standing on it shoves nothing) + / - - raise / lower push_factor (starts at the default, 1.0) 0 - push_factor = 0, the opt-out (pure block) R - rebuild the scene Escape - quit Run: uv run python examples/features/physics/character_push.py Headless self-check: uv run python examples/features/physics/character_push.py --test ## Source ```{literalinclude} ../../examples/features/physics/character_push.py :language: python :linenos: ```