Despair Physics Manual
Despair Physics Manual
Phased Array Studios
Thanks for your purchase!
On Unity 2022.3, my character slides around while just standing |
Welcome
Despair Physics turns a humanoid character into a balancing marionette. It walks on its animation as normal, and when something shoves or shoots it, physics takes over. It steps to catch itself, staggers, grabs walls and clutches its wounds, and falls in a way that (hopefully) looks like a person and not a sack of potatoes. Afterwards it gets back up, or stays down if it's dead.
If you miss Euphoria, this scratches that itch.
What you need
•Unity 2022.3 LTS or newer, with the built-in physics. That's the default unless you've changed it. On 2022.3 there's one setting to change if your characters stand around without walking: see Troubleshooting, “On Unity 2022.3, my character slides around while just standing”.
•A humanoid character. Two arms, two legs, a head. Mixamo, Character Creator, VRoid, Daz, Blender and most asset store characters work.
•Any render pipeline. Built-in, URP and HDRP all work. Only the demo scenes care, and they switch their own materials to your pipeline (see Troubleshooting if they look pink).
What it can't do
•Animals and monsters. It's built for a two-armed, two-legged human shape. Quadrupeds and extra limbs are out.
•Generating walks and runs. Walking and running come from your animation clips, and physics takes over only when the character is disturbed. You can drive a body with physics through your own scripts and custom reactions (chapter 7), but the package won't invent a walk or run cycle.
How to read this manual
Chapters 1 to 5 take you from nothing to a character you can shove, shoot and kill. That's the whole basic loop, and you can stop there. Chapters 6 onwards cover tuning the feel and running crowds, plus troubleshooting.
Every chapter has a matching demo scene. If something here doesn't click, open the scene and poke at it. It usually explains itself faster than I can.
1. Five-minute tour
Before setting up your own character, see it working on the one provided. It takes about five minutes and shows you what you're aiming for.
1.Install Despair Physics from the Package Manager.
2.Go to Tools > Despair Physics > Import Demo Scenes... (or Package Manager > Despair Physics > Samples > Import).
3.Open the scene 01 Quickstart.
4.Press Play and click the character. Click it a lot.

What you should see
The character gets pushed from wherever you click. A small push gets a step or two, and it carries on. A big one makes it stagger, fall, lie there for a bit, then get up. The on-screen log shows each event as it happens (hit, lost balance, fallen, got up).
Didn't work?
•Pink characters and floors: the demo scenes switch their materials to your render pipeline when you import them, so this should not happen. If it does, see Everything in the demo scenes is pink in Troubleshooting. It's cosmetic only.
•Errors after importing: the demos need the Unity UI package (com.unity.ugui). Install it from the Package Manager.
Want more?
Every demo scene has an on-screen panel saying what it shows and how to control it, plus Previous and Next buttons. Going through all 15 in order is this manual with fewer words.
2. Turning your character into a Despair ragdoll
The Setup Wizard does all of this with no code. You pick a character, check what it found and press Build. The demo scene 02 Build a Ragdoll walks through the same thing on a raw model if you'd rather follow along there.
Opening the wizard
There are three ways in:
•Select your character and go to Tools > Despair Physics > Setup Wizard.
•Right-click the character in the Hierarchy and choose Despair Physics > Add Active Ragdoll.
•Right-click its Animator component and choose Add Active Ragdoll.
Your character can be in a scene, a prefab or just the imported model file.

The wizard has five sections, top to bottom, each with an icon showing whether it's happy. Work down the list, and if everything's green, press Build.
Step 1: Character
Shows what you picked and how it'll be saved (more on saving below).
The lock button keeps the wizard on this character while you click around in the Hierarchy, which you'll want in step 2 when you click bones. It also locks itself when you pick a bone by hand.

Step 2: Bones
The wizard needs to know which bone is the hips, which is the left knee and so on. It works this out itself for most characters: anything with a Humanoid avatar, plus Mixamo, Unreal mannequin, Character Creator, Daz, VRoid, Blender Rigify, Auto-Rig Pro and 3ds Max Biped rigs.
Problems are listed at the top of this section. Open Bone for each part to see each body part and its bone, and drag the right one in where it's wrong.

If nothing maps at all (a custom rig with odd bone names), every field is empty and you fill them in by hand. The lower spine bones are optional. You can also tick Guess from names, but check every bone it picks: it can grab a helper bone that looks right and isn't.
Step 3: Body
The physical shape: weight, collider size and pose. The defaults suit a normal-sized adult, so most of the time you can glance at it and move on.
•Mass. Leave it at 0 and the weight is worked out from the character's height (about 94 kg for a 1.8 m person).
•Limb thickness. If the arms and legs overlap the body in the preview, lower this.
•Interpolate transforms. Leave it on. It smooths motion on high refresh rate screens.
Under Advanced you’ll find weight per body region, physics materials, and materials to draw the body and joints with. With fit-to-mesh turned on, a “Fit to these meshes” list appears, with one tick per skinned mesh (it only shows for characters with at least two skinned meshes). The one to know is that list: untick hair, capes and loose clothing, or the colliders puff up around them.
Step 4: Animation
Two things go here: the model the animations play on (usually pre-filled with your character's model) and the locomotion clips (Idle, Walk, Run and the get-up animations). You can skip the clips and add them in chapter 4; the character will still stand and react without them.
If you skip the clips, leave Add locomotion unticked, or the character will log a warning and stand and react through physics alone, without walk animation.
Step 5: Preview and build
Preview builds a hidden copy and draws its colliders in the Scene view. Look for:
•Colliders roughly hugging the body, not floating off it or ballooning.
•Arms and legs not buried in the torso.

Build does it for real. If you haven't previewed, it previews first, and it asks before doing anything that can't be undone. After building, you are free to edit the colliders for better coverage if needed.
Where does the result go?
|
You picked |
What happens |
|
A character in a scene, or a prefab placed in a scene |
It's built in place, and one Ctrl+Z undoes the whole build. |
|
A prefab asset |
The prefab is built and saved. |
|
A model file (FBX and so on) |
A new prefab variant is made next to the model. Your model file isn't touched. |
Changed your mind? Remove Ragdoll in the wizard takes it all back off.
What you should see
Press Play. The character should stand there, maybe swaying slightly. If it falls over straight away, go to chapter 3.
3. Checking it's healthy
The Validator checks every ragdoll in your open scenes and your project's physics settings, and tells you what's wrong. It can usually fix it too. Run it after every build and whenever a character does something weird.
Open it from Tools > Despair Physics > Validator.

Fix only appears when the fix is safe. Fix All applies every safe fix at once.
The same findings appear on the character, in the Active Ragdoll component in the Inspector, so you don't need the Validator window if you're already looking at the character.
The warnings you'll most likely see
|
Warning about |
What it means in plain words |
What to do |
|
An Animator on the character |
The character's original Animator is fighting the ragdoll for control. |
Press Fix to remove it. The ragdoll plays your animations its own way. |
|
Fixed timestep slower than 50 Hz |
Unity is running physics too few times a second, so balancing gets sloppy. 30 Hz is the slowest rate tested. |
Press Fix (it sets the Fixed Timestep to 0.02 s in Project Settings > Time). |
|
The ragdoll layer doesn't collide with itself |
Body parts can pass through each other and through other characters. |
Press Fix (it lets the layer collide with itself in Project Settings > Physics). |
|
Body far from the reference size |
The settings are made for a 1.8 m adult and your character is much bigger or smaller. |
Press Fix on the "tuning is set for a body..." warning (it runs Scale to Rig), see chapter 8. That warning appears once the body's height is roughly 10% off, or its mass roughly 20 to 25% off, what the tuning was set for. A separate warning (with no Fix) says the body is outside 0.6× to 2.5× the reference height, the tested range. |
|
Mixed Generic and Humanoid clips |
Some of the character's clips are Generic and some Humanoid, so some won't play right. |
Make them all one kind, see chapter 4. There is no Fix; the Console and the Validator name the clips that do not match. |
|
Auto Sync Transforms is on |
A project physics setting that stops smooth motion (interpolation) from working. |
Press Fix to turn the setting off (Project Settings > Physics). The warning only appears on a character with Interpolate transforms on. |
|
Locomotion without Idle and Walk clips |
Marionette Locomotion needs at least an Idle and a Walk clip, or the character stands but never walks. |
Assign both clips, see chapter 4. There is no Fix. |
|
Physics simulation mode isn't Fixed Update |
Characters step in FixedUpdate. With another mode they are not stepped unless you simulate physics once after each FixedUpdate yourself. |
Set Project Settings > Physics > Simulation Mode to Fixed Update. There is no Fix. |
|
Muscles set for another size |
The muscles' strength (mass × height) doesn't match this body. It usually means the character was scaled by hand after it was built. |
Press Fix (it runs Scale to Rig), see chapter 8. |
|
Total mass out of range |
The muscles are tuned for bodies of 20 to 400 kg in total. |
Rebuild with a Total mass in that range. There is no Fix. |
|
Colliders overlap |
Two body parts' colliders overlap by 1 cm or more. They are shoved apart once the ragdoll layer collides with itself. |
Rebuild with a smaller Limb thickness or Torso width in the wizard. There is no Fix. |
|
Character scaled unevenly |
The Transform's scale differs between axes, but colliders and joints assume the same scale on all three. |
Make the scale uniform. There is no Fix. |
|
Animation skeleton has no model |
The Marionette Animator has no model to make its hidden animation skeleton from, so Play stops with an error (red). |
Assign the character's model to the Skeleton field of the Marionette Animator, or remove the animator to balance without animation. |
|
A part, collider or link is missing |
A body part is missing or doubled, a part has no collider, or the pelvis link is immovable (red errors). |
Rebuild the ragdoll with the Setup Wizard. The immovable pelvis also has a Fix button. |
|
Parts on more than one layer |
Body parts sit on different layers, so the collision matrix may not cover every pair (information only). |
Check Project Settings > Physics > Layer Collision Matrix. There is no Fix. |
The inspector in Play mode
While the game runs, the Active Ragdoll component shows what the character is doing right now: standing, falling or down, how far it's tilting, the last hit it took and so on. Handy for working out why something just happened.

4. Making it walk
To walk, your character needs the Marionette Locomotion component and at least an Idle and a Walk clip. Without it, the character still stands and reacts to hits but never goes anywhere.
The bundled locomotion is deliberately small: it walks to a point in a straight line, plays idle when it arrives and handles getting back up after a fall. It's an example to build on. Anything fancier, like strafing, aiming, more get-up options or jumping needs a custom implementation that plugs into the existing locomotion system (see the appendix).
Adding it
1.Tick “Add locomotion” checkbox inside the wizard, or select your character and add the Marionette Locomotion component and a Terrain Walker component to make it actually move. Terrain Walker is a script of the Demo Scenes sample, so import that first; without it, drive the locomotion from your own script (see the README).
2.Drag in your Idle and Walk clips on the Marionette Locomotion, and assign points you want your character to patrol in order on Terrain Walker. Run and the get-up clips are optional.
3.Press Play.


The one thing that trips everybody up: root motion
There are two kinds of walk animation:
•Walks that move. The animation itself carries the character forward. This is called root motion.
•Walks on the spot. The legs move but the character stays in place, like on a treadmill. Mixamo calls these "In Place", and some asset store packs use them.
Both work. Each has its own setup below.
If your walk moves (root motion): The character walks exactly as far as the clip does, so the feet never slide. The steps depend on the rig: Generic (the default, and the one the sample character uses) or Humanoid (Rig tab > Animation Type). Follow the one that matches your model.
Generic rig
1.Select the model file and open the Rig tab. Make sure Animation Type is Generic.
2.Set Avatar Definition from No Avatar to Create From This Model (Otherwise Root node will not appear).
3.Set the Root node to the hips/pelvis (the root bone driving the whole rig in world space). Do NOT use the Root Motion Node under the Motion foldout in the Animation tab unless you know what you are doing, it will break things.

That is all. Leave the clips alone. Unlike Humanoid rigs, Root Transform setup is not required.
Humanoid rig
A Humanoid model has no Root node to set: Unity works the root out from the body. Instead you decide, per clip, which parts of the root stay in the pose and which become travel. The locomotion steers the character itself, so it wants the clip's travel but not the clip's turning. If the root rotation is left as motion, a clip that keyframes it (or follows the swing of the hips and shoulders) keeps turning the character while it walks, and the steering fights it. Root transform setup is dependent on how the clip keyframes the root bone, so different animation packs could need different Root transform setup.
For DespairRig, Select each clip on the model file's Animation tab and set its Root Transform options:
|
Clip |
Rotation |
Position (Y) |
Position (XZ) |
|
Walk, Run |
Bake Into Pose ticked, Based Upon Original |
Bake Into Pose unticked, Based Upon Original |
Bake Into Pose unticked, |
|
Idle |
Bake Into Pose ticked, Based Upon Original |
Bake Into Pose unticked, Based Upon Original |
Bake Into Pose unticked, Based Upon Original |
|
Get-up (back and front) |
Bake Into Pose ticked, Based Upon Original |
Bake Into Pose ticked, Based Upon Original |
Bake Into Pose ticked, Based Upon Original |
If your walk is on the spot (in place): tell the locomotion how fast the feet are going. Set In Place Walk Speed (and In Place Run Speed if you have a run) on the Marionette Locomotion component, in metres per second.
You won't know the exact number (unless the asset states it or you measure it), so guess and watch the feet:
•Feet skating forward like on ice: the number is too high.
•Feet sliding backwards like a moonwalk: the number is too low.
•Good starting points: about 2 for a walk, 3.5 to 5 for a run.
This value is only read when the game starts, so changing it during Play mode does nothing. Stop, change, play again.
Generic or Humanoid clips?
Both work, but every clip on one character has to be the same kind: all Generic or all Humanoid. That covers Idle, Walk, Run, both get-up clips and anything in your Animator Controller. A Humanoid clip does nothing on a Generic character, and a Generic clip plays wrong on a Humanoid one.
•All Generic: the default. Nothing to do.
•All Humanoid: your model needs a Humanoid avatar (model file > Rig tab > Animation Type: Humanoid), and every clip you assign has to be Humanoid. The get-up clips are optional: leave one empty and the package plays its own, built as a Humanoid clip, so the character stays Humanoid.
•Mixed by accident: press Play and the Console names the clips that don't match. The Validator lists them too.
Already have an Animator Controller?
Assign it to the Controller field of the Marionette Animator. Its root motion moves the character. Add an Animator Parameter Driver and create these parameters in the controller yourself: Speed (Float), Running (Bool), State (Int), GettingUp (Bool). The driver fills in only the ones that exist, so you can leave out any you don’t use. The locomotion still needs its Walk clip for speed, and its get-up clips still apply.
Two gotchas:
•All clips, in the controller and on the locomotion, must be the same kind: all Generic or all Humanoid (see above).
•The layer that moves the hips has to be the first layer in your controller.
The demo scene 10 Locomotion Options shows the same patrol done with clips, with a Mecanim controller, and with custom code.
Didn't work?
•It turns towards where it's going but never moves: your Walk clip has no root motion or you haven't set In Place Walk Speed. The Console will say so on start.
•It stands but never walks: check that Idle and Walk are both assigned. The Console says what's missing.
Want to see it walking on stairs, slopes and moving platforms? Scene 05 Terrain.
5. Hitting, knocking down and killing
Despair Physics decides how the body reacts. It knows nothing about health or damage; that's your game's job. You tell the character "you got hit here, this hard" or "you're dead now" and it does the rest.
The four states
At any moment a character is in one of four states:
•Active: alive and on its feet. Walking, standing, staggering and catching itself all count as Active.
•Dying: took a lethal hit and is going down.
•Downed: on the ground but alive. It'll get back up on its own, unless you've told it not to.
•Dead: limp. Comes to rest after a while and stays there.

A revived character lands in Downed and gets up from there. Revive a dying character before it hits the floor and it's Active again.
What you can tell a character to do
|
Command |
What happens |
|
Hit |
A push at a body part, plus the reaction it starts: a stagger, a hand to the wound, a buckled leg, a standing death or a drop. You choose how hard and whether it's the killing blow. |
|
Knock Down |
Puts a standing character on the floor, alive. It gets up later if it has locomotion. Does nothing unless the character is Active. |
|
Get Up |
Makes a downed character get up right now instead of waiting, whatever the get-up delay and Auto Get Up say. Gives back false (and does nothing) if the character is not downed, is still falling or hanging, or has no locomotion to play the get-up. Turn Auto Get Up off to keep a body down until your game calls this. |
|
Kill |
Goes limp instantly, from any state. Does nothing to a character that is already dead. |
|
Revive |
Brings a dead character back where it lies, keeping its pose. It is Downed and gets up from there (or waits for Get Up). A dying character still on its feet is let off and is Active again. |
|
Blast |
An explosion: everything nearby gets pushed away from the centre, harder the closer it is, fading to nothing at the blast radius. By default nothing blocks the blast, so walls do not shield; a programmer can pass occluder layers to change that. Blast All does it to every ragdoll in the scene. |
|
Teleport |
Moves the whole body somewhere else, in any state. Use this instead of dragging the character's transform while the game runs. |
|
Reset To Standing |
Snaps it back to Active and standing clean on the root transform, with every reaction forgotten (a blocked hand included), as if nothing happened. |
|
Disturb, Sustain Balance |
Hands a body that something has grabbed or moved over to physics, then keeps it stepping while it is held. Call Disturb first, then Sustain Balance while you hold it. |
|
Look At |
Where the head looks when nothing else draws it. |
|
Aim, Aim Recoil, Release Aim |
Swings an arm out and points a held object at a target, kicks it back for recoil, and lets go. |
|
Hand Free, Set Hand Blocked |
Tells you whether a hand is whole and idle, and takes a hand out of use (a lost arm, something in the hand). A blocked hand takes hold of nothing. Standing back up gives both hands back. |
|
Set Knock States |
Sets which states knock other characters about and which can be knocked (see Bumping into each other in chapter 7). |
|
Set Seed, Clear Seed |
Gives the character a random stream of its own, so the same seed and the same hits make the same choices (for replays and networking). Clear Seed goes back to Unity's global Random. |
No-code: buttons and triggers
Knock Down and Kill can be wired to any UnityEvent, like a UI Button's On Click. Drag the character into the event slot, pick ActiveRagdoll > Kill, done.


No-code: the demo scripts
The demo scenes come with ready-made scripts you can copy while you prototype:
•Click To Push (scene 01): click a character to shove it.
•Submachine Gun, Ragdoll Health and Health Bar (scene 03): a gun that hits individual body parts, with real health; only the last bullet kills.
Listening for what happened
The character also reports what happens to it. Every event below appears in the Events foldout of the Active Ragdoll component, so you can hook up sounds, particles and score without code.
|
Event |
Fires when |
|
State Changed |
It switches between Active, Dying, Downed and Dead (it reports the old and the new state). |
|
Struck |
A hit reached it. |
|
Lost Balance |
It can't catch itself any more and starts staggering. |
|
Fallen |
It went down, alive. |
|
Recovered |
It caught itself after a stagger, or finished getting up. |
|
Revived |
Revive brought a dying or dead character back. |
|
Died |
It's dead. |
|
Settled |
The corpse came to rest (after the settle time) and may sleep. |
|
Get Up Started |
A downed character started getting up, by itself or because Get Up was called. |
|
Landed |
It fell from a height and hit the ground (its high fall ended). |
|
Gripped |
A hand grabbed a wall or a ledge (it reports which hand and which of the two). |
|
Grip Released |
A hand let go, was torn from its hold, or the character died. |
For programmers
Hitting from a raycast, the basic pattern:
if (!MarionettePart.TryGetPart(hit.collider, out var part)) return; // not a ragdoll
var ragdoll = part.GetComponentInParent<IActiveRagdoll>();
bool kills = myHealth.Apply(damage); // your game's rule
ragdoll.Hit(new RagdollHit(part.Index, hit.point, ray.direction,
impulse: 60f, killImpulse: 90f, spreadToBody: 0.1f, lethal: kills));
The full command list and parameters are in the README under Talking to a character.
Reusing characters (pooling)
If you spawn and despawn lots of enemies: disable the character, move it to the spawn point, enable it again. A moment later it's standing there fresh.
6. Giving your character a personality
Out of the box, characters are hard-hitting and quick to react, with every reaction switched on. That's a good action movie default, but your zombie and your armoured boss probably shouldn't fall over the same way.
There are hundreds of numbers under the hood, and you don't need to touch any of them. Start with the dials.
The seven dials
The dials are seven sliders at the top of the Active Ragdoll inspector (or a profile, covered below). Each moves a whole group of settings at once, so you can shape a character in a minute.
|
Dial |
Turn it up for |
|
Weight |
A heavier, slower body. Low end is light and flung around (long, quick steps), high end is heavy and planted (short, slow steps, brakes hard). The Heavy example profile is this dial at +1, and Light is at -0.7. |
|
Toughness |
Taking more punishment before going down. Low end gives up as soon as it is clearly off balance; high end folds far over its feet, staggers long and takes its time dying. It moves the balance limits as a group, with how hard a hit lands. |
|
Coordination |
Cleaner, better-placed steps. Low end is sloppy: it misjudges where to step, overshoots, pauses and sways, like the Drunk example profile. High end is crisp: prompt, clean steps, a little crisper than the defaults. It moves step timing, reach and pauses, and how quickly the arms and the hand to the wound respond. |
|
Injury |
A more fragile, already-hurt body. This is the one dial that runs from 0 (unhurt) to 1 (badly hurt) instead of -1 to +1. Past halfway it stops catching every step and stops fighting to keep its feet (Catch Every Step and Keep Feet switch off). Matches the Injured example profile. |
|
Drama |
Big, cinematic reactions. Low end is grounded and realistic, high end is big hits, twists, stumbling and deaths that play out. The ends are the Realistic and Cinematic example profiles. Past halfway towards grounded it also switches off Head Hold, Catch Every Step and Keep Feet. |
|
Recovery |
Quicker recovery. Low end is slow, like the Drunk and Realistic profiles; high end is quick, a little quicker than the defaults. It moves the get-up delay and speed, how firm the body is on the floor, how fast a hurt leg heals, and how fast a hit's lean and looseness fade. |
|
Variability |
Less predictable reactions, so the same hit does not play out the same way twice. Low end (steady) is like Heavy and Realistic, high end (loose) like Drunk. It moves the random spread of hit strength, direction and snap, the temperament of each stagger, how differently the arms swing and how long a hand holds a wound. |
Good to know:
•Move one or two at a time, then hit the character and see. They add up, so moving all seven at once is hard to read.
•Back to zero undoes it. Putting a dial back to 0 restores everything it changed.
•Your own tweaks are kept. If you change a setting by hand after a dial moved it, the dial leaves it alone from then on. The inspector shows how many of those there are. Reset Dials puts everything the dials control back to the start.

Scene 08 Dials tours all seven, then lets you set two characters to your own slider positions and shove them side by side against the default. It's the fastest way to get a feel for them.
Profiles: saving a personality
Once a character behaves how you like, save it as a profile that other characters can use. A profile is an asset file holding all the settings.
•Make one from a character: click Save to profile... in the Active Ragdoll inspector. This works in Play mode too, which helps because anything else you tweak during Play is lost when you stop.
•Make an empty one: Assets > Create > Despair Physics > Ragdoll Profile.
•Use one: drag it into the Profile slot of any character. Any number of characters can share one.
Watch out: profiles are shared. Editing a profile changes every character using it. To tweak just one character, click Use own copy first. It copies the profile's settings onto that character and stops sharing.
The example profiles
The demo scenes come with ready-made profiles to start from:
|
Profile |
Feels like |
|
Default |
The out-of-the-box exaggerated movie body. Not an asset: it is what a character runs when no profile is assigned. |
|
Heavy |
A big, planted body that takes a lot to move: hits land at 0.8 strength (the default is 1.35), steps are short and the death plays out longer (1.8 to 3.2 s). Dials: Weight 1, Variability -0.8. |
|
Light |
Flung around easily: hits land at 1.78 strength, steps are long and quick, and the stagger runs long (1.5 to 2.5 s). Dials: Weight -0.7, Variability 0.4. |
|
Drunk |
Wobbly legs, sinks into the knees: short, late steps, bent knees (Stance Knee 0.24, the default is 0.12) and a long stagger (1.5 to 2.3 s). Dials: Coordination -1, Variability 1, Recovery -0.8, Weight -0.3. |
|
Injured |
Already hurt, goes down easily: hits land at 2.1 strength, steps are tiny and low, the stagger is short (0.8 to 1.4 s), getting up is slow, and Keep Feet and Catch Every Step are switched off. Dial: Injury 1. |
|
Realistic |
Grounded, understated reactions: hits land at 0.77 strength with weak snaps and a shorter death (0.9 to 1.9 s). Head Hold, Keep Feet and Catch Every Step are switched off. Dials: Drama -1, Weight 0.6, Variability -1, Recovery -0.6. |
|
Cinematic |
Big, showy reactions: hits land at 1.65 strength with strong snaps, a long stagger (1.9 to 3.1 s) and a long death (1.8 to 3.3 s). Dials: Drama 1, Recovery 0.3, Toughness 0.3. |
|
Mobile |
Cheaper to run, for phones (see chapter 9): Free Arm, Wall Grip, Graceful Fall, Catch Every Step and Fall Grip are switched off. The profile only changes how characters react; the cheaper physics settings of scene 13 come from that scene's own script, not from the profile. |
Scene 07 Profiles puts them side by side, plus a lane for your own profile, all taking the same five hits, with a grid showing who stayed standing. Drop yours in and compare.
Changing it during the game
Want a difficulty setting where enemies get tougher? The dials and profile parameters can be moved from code too. More information on that in the readme.
7. Fine-tuning reactions (advanced)
The dials cover most of what you'll want. This chapter is for when you want one specific thing gone or exaggerated, like "I never want them grabbing walls" or "downed enemies should stay down until I say so".
Everything a character does when it's hit, loses balance, falls or dies is a reaction. Each is a foldout in the Active Ragdoll inspector (or the profile) with its own checkbox and settings. Untick it and that reaction never happens, whatever the numbers inside say.

See them one at a time
Scene 06 Reactions has nine bays. Each holds the same character twice: the left one with a reaction on, the right one with it off. A camera tour hits each pair in turn.
•Space: hit again
•P: pause
•Left / Right: change bay
•S: slow time to a quarter
The reactions, grouped by when they happen
When a hit lands
|
Reaction |
What it does |
|
Limb Carry |
A hit on an arm, leg or head passes some of its force into the body (45% by default) and caps how fast the part itself is flung (4 m/s), so the body takes the hit instead of the limb flying off like a noodle. |
|
Big Hit |
Some hits randomly land extra hard. By default 14% of bullets land 1.6 times as hard. |
|
Push Cap |
Limits how far one hit can push. A body already moving along a bullet's path is pushed less by the next one, bottoming out at 35% once it is going 2.8 m/s along it (with some randomness), so a burst can't send it flying faster and faster. |
|
Sustained Fire |
A stream of bullets loses its edge: each round that follows closely pushes 7% less than the last, down to 65% of full strength, and the strength comes back (2.2 per second) once the fire stops. Off, every round pushes alike. |
|
Rapid Snap |
A round landing right after another snaps the trunk less (down to 30%, back to full over 0.5 s) and shoves the whole trunk instead of folding the part it hit. A burst pushes the body; a single round snaps it. |
|
Barrage Hold |
A dying body is held on its feet while a burst of fire lasts (three or more rounds in quick succession) and for 0.3 s after the last round, for up to 2.5 s. It lets go if the trunk tilts past 1.25 rad (about 72°). Off, it falls on its own balance. |
What the hit does to the body
|
Reaction |
What it does |
|
Wound Reach |
A hand goes to the wound and the head glances at it. By default 95% of hits send a hand, which holds the wound for 1.8 s plus up to 0.8 s at random; the head looks at it for 0.6 s. |
|
Head Hold |
After a lethal head shot (40% by default), the character stays up on its feet for 1.5 to 2.5 s with its hands doing one of several things: both on the head, one on the head and the other arm raised, limp, spread or flailing, or neither on it (zombie reach, limp, raised or flailing). A head shot at a body that is already dying finishes it at once. |
|
Leg Hit |
A shot leg weakens (to 45% strength, recovering over 3 s), buckles and limps. The good leg takes the weight, the body hunches over the wound. Two leg hits within 2.5 s drop it (Hits To Collapse and Kneecap Window). |
|
Arm Flinch |
A hit arm folds at the elbow and pulls in, then lets go over 0.5 s, instead of swinging like a stick. |
|
Neck Whip |
The head snaps back on a head shot: the neck is kicked the other way to the head, by half the size of the head's kick, so the head whips on its neck instead of nodding. |
|
Gut Fold |
A round in the belly from the front folds the trunk over it (spine, hips and head, 0.45 rad or about 26°, over 1.1 s). |
|
Back Arch |
A round in the back arches the trunk back (0.3 rad or about 17°, over 0.6 s). |
|
Torso Twist |
A round off the body's centre spins and twists the torso, more the further from the centre it lands. Off, hits only push and snap. |
|
Hit Lean |
The trunk gives way to a bullet and stays leaned while the legs chase the body: 0.18 rad per hit, building up to 0.4 rad at most, fading at 2.8 per second. Off, hits add no lean. |
|
Hit Weakness |
The hit goes through the whole body: its muscles go loose at the hit (60% by default) and firm up again over 0.22 s. Off, a hit does not loosen the muscles. |
|
Unsnap |
Each snap is kicked back the other way a moment later (70% of it, after 0.02 s) as the muscles catch it, so the hit reads as a sharp tick instead of a push. |
Losing balance
|
Reaction |
What it does |
|
Stagger |
A few tired steps before the fall (1.4 to 2.2 s by default), leaning further and weakening with every step. Off, losing balance means going straight down. |
|
Arms Out |
Arms swing out for balance, windmill (when it backs up fast) and brace (a forward stagger running out of steps brings them forward to catch the fall). Off, the arms stay on the animation. |
|
Free Arm |
What a dying body's free arm does instead of idling (55% by default): raised, spread out, flailing, limp or reaching out like a zombie. The odds of each are relative. |
|
Wall Grip |
A staggering or falling body (55% by default) puts a hand on a nearby wall, pillar or table edge. A palm on a flat surface can only lean; an edge is held all round, three times as hard. A hand holds on for 1.4 to 3.4 s. |
|
Keep Feet |
A dying body's balance may not give up for the first 90% of the dying time, so it stays on its feet until the end. It falls anyway once the trunk tilts past 1.2 rad (about 69°). |
|
Catch Every Step |
A dying body stays up by catching itself with every step: long, quick steps (0.25 s at most) that reach the point that would stop it, and little lean from the fire. |
Stepping
|
Reaction |
What it does |
|
Step Planning |
Aims each step where the body will be when the foot lands, and re-plans a step in flight. Off, steps aim at the lift-off point, land short, and the body walks off on them. |
|
Step Rhythm |
The feet take turns instead of the same foot stepping twice. Off, a sideways push keeps one leg striding while the other drags. |
|
Slip Step |
A foot sliding along with the body (faster than 0.35 m/s) takes a step instead of skating. |
|
Close Stance |
The feet come back together once the body has stood still for 0.25 s and they are wider than 0.6 m apart, closer than 0.1 m, or one is 0.12 m ahead of the other. |
|
Landing Give |
The knee gives a little as a foot lands (the hips drop 2.5 cm at 1 m/s or faster). Off, the legs land stiff. |
|
Creep Brake |
A body creeping along (under 0.4 m/s) in little steps for 1.5 s is braked to a stop. |
|
Foot Roll |
Heel-to-toe roll, so the feet don't slap down flat: the toes peel off as a foot lifts (0.45 rad) and the heel of a planted foot comes up (0.4 rad) as the body rolls over it. Off, a flat foot is lifted and set down like an iron. |
|
Braking Steps, Stride |
Braking Steps: a slow body (under 0.9 m/s) that is not in danger steps to stop instead of to catch itself. Stride: a fast body takes a few big strides (0.3 m of step per m/s of speed) instead of many small corrections. |
|
Stumble |
A walking or running body faster than 1.6 m/s that takes a hit goes physical for a moment, stumbling and running on before it balances. A hard hit (1.4 times a normal one, such as a blast) hands it straight to the balancer. Off, any hit hands it to the balancer at once. |
Falling and dying
|
Reaction |
What it does |
|
Graceful Fall |
How a standing death goes down over 1.1 to 1.6 s (to the knees, a topple, a crumple or a spin; backwards, a hand catch instead of the knees). 50% of short deaths and 15% of the longest drop like a brick instead. |
|
Death Shove |
When a standing death finally drops, it gets a shove along the killing shot (35 N·s by default). |
|
Carried Death |
A killing body shot, or a held head shot, may be carried off by the rounds that follow (50% by default), staggering away for as long as the fire lasts and 1.8 to 3 s at most. A body killed while moving faster than 0.6 m/s is always carried by its own momentum. |
|
Hands Out |
Hands reach out to break the fall, starting while the body still staggers (once it is 60% of the way to going down), and the elbows give as the hands land. Off, the arms go down with the rest of the body. |
|
Tumble |
A body that comes down sliding fast (landing faster than 2.2 m/s), or goes over on stairs or a slope, rolls like a log instead of skidding to a stop. Off, it slides. |
|
High Fall |
Falling from a height of 1.2 m or more: the body keeps its orientation, pedals its legs, windmills its arms and gets its legs under it 0.3 s before landing. Off, it tumbles down as a ragdoll. |
|
Fall Grip |
A falling body (85% by default) that is not coming down faster than 6 m/s, with its feet at least 0.7 m above the ground, grabs an edge within reach and hangs, kicking, for 2.5 to 5.5 s on two hands, until its grip gives out. |
On the ground
|
Reaction |
What it does |
|
Writhe |
A downed character writhes on the floor in bursts of effort, tiring to 45% of its start over 6 s. Off, it lies as it landed. |
|
Get Up |
Gets up on its own after the get-up delay (1.8 to 2.8 s by default). Off, it stays down until your game tells it to (see Get Up in chapter 5). A character's own Auto Get Up switch does the same for one character. |
|
Get Up Hit |
A hit while getting up knocks it back down (every time, by default) to lie there a while and try again. Off, it gets up whatever hits it. |
Bumping into each other (Body contact in the inspector) decides which states can knock other characters over and which can be knocked. By default corpses and characters getting up don't knock anyone, so a body sliding into a pedestrian gets walked around instead of bowling them over.
These are the states the Body contact reaction works with. It only vetoes: the character must also close on the other body at Knock Speed (0.8 m/s by default) or faster, and a stumbling character always knocks.
|
State |
What it is |
Knocks others by default |
Can be knocked by default |
|
Walking |
Animated: walking, running or standing on its clip (or standing with no locomotion). |
Yes |
Yes |
|
Stumbling |
A walking body that was hit and is stumbling on before it balances. |
Yes |
Yes |
|
Recovering |
Knocked off its animation and catching itself with steps, without having lost its balance. |
Yes |
Yes |
|
Staggering |
Lost its balance and staggering toward a fall. |
Yes |
Yes |
|
Dying |
Killed but still on its feet. |
Yes |
Yes |
|
Downed |
Knocked down alive: falling or lying on the floor, not yet getting up. |
Yes |
Yes |
|
Getting up |
Downed and playing a get-up. |
No |
Yes |
|
Dead |
Limp, settling or lying. |
No |
Yes |
Your own reactions
The list isn't closed. You can write custom reactions: your game's own things a character does when hit, falling, dying or getting up. Once written, they behave like the built-in ones: a foldout with a checkbox and its own settings, saved in the profile and shared by every character on it.
To add one, open the Custom Reactions section of the Active Ragdoll inspector (or the profile) and press Add Reaction. It lists every custom reaction in your project.

A custom reaction can also hold part of the body in a pose while the rest keeps balancing and taking hits. Examples:
•Arms up to shield the head after the first hit.
•A limp held on one leg.
•Leaning into cover.
The pose is released when the character loses its balance, falls, dies or is reset, and the reaction can pick it back up once it recovers.
Writing one takes code. The README has two short examples (a flinch and a head shield) under Tuning; see the appendix.
Looking stiff?
These settings carry most of the "human touch". If your character moves like a mannequin, look here first:
•Foot Roll: Toe Off, Heel Off and Ankle Stiffness.
•Hands Out: Reach Delay, Absorb Bend and Absorb Stiffness (how the hands meet the floor).
•Arms Out: Windmill and Brace Reach.
•Feel > Stance Knee: how bent the knees stay while balancing. Raise it for tired or drunk legs.
Random or repeatable?
Randomness is a setting too. Set every Chance to 0 or 1, every Randomness, Jitter and Variance spread to 0, and every min and max range to the same number twice, and a hit plays out almost the same every time (great for cutscenes and trailers). Which hand or side is picked stays random until you set a seed.
8. Big and small characters
All the settings are made for a normal adult: 1.8 m tall, 94 kg. On those settings a 4 m ogre or a 1.2 m goblin might be unstable. Two buttons fix that.
Supported sizes: from about 0.6× to 2.5× the reference, so roughly 1.1 m to 4.5 m tall. Outside that, you're on your own.
Step 1: Scale to Rig
Press Scale to Rig in the Active Ragdoll inspector (or the Fix button the Validator shows for it). It resizes the step lengths, timings and forces to fit this body, so it moves like a normal person would at that size.

•Resized the character later? Press it again.
•It doesn't change how hard your weapons hit. A giant still shrugs off a pistol round, which is probably what you want.
•If the character uses a shared profile, this changes every character on that profile. Click Use own copy first if it's the only giant.
•Scaled the character by hand (changed its Transform scale)? You must press this, or its muscles stay human-sized.
Step 2 (if it's still off): Rig Calibrator
Scale to Rig gets close but not perfect, and very big characters can still look off. The Rig Calibrator goes further: it shoves your character over and over in an empty test scene and adjusts the settings until it reacts like the reference body.
1.Open Tools > Despair Physics > Rig Calibrator, or click Calibrate... in the inspector.
2.Start it. Unity enters Play mode on its own with just your character and a floor.
3.Wait. Around 4 minutes for a normal run. Make a coffee. The Speed setting runs it faster.
4.It leaves Play mode on its own when it's done. Nothing has changed yet.
5.Press Apply to keep the result, or Save as Profile to save it as a new profile.

Tips:
•Calibrate first, then use the dials. The calibrator aims at the default character, so shape the personality afterwards.
•Two runs give slightly different results (a few percent). That's normal.
•It might change Hit strength, which changes how hard every weapon hits this character.
•Calibrating works better if the character has an Idle clip.
9. Lots of characters
Each balancing character costs about 0.2 ms of CPU per physics step, plus Unity's own physics. In the editor on my machine, that's around 100 fps with 32 characters all getting shoved at once, and around 40 fps with 64. A finished build runs faster, but phones run much slower, so read this chapter if you plan on crowds.
Find your own limit first
Open scene 12 Benchmark (or 13 Mobile for phones), build it to the device you're targeting, and keep pressing Up to add characters until the frame-time warning shows. Then leave room for the rest of your game. The Benchmark scenes let you switch between performance presets to see how much frame time each one saves for crowds.

Making far-away characters cheaper
Add a Ragdoll LOD Settings component to any object in your scene (Add Component > Despair Physics). It decides how much effort each character gets, mostly based on its distance from the camera:
|
Level |
Who gets it |
What it costs |
|
Full |
Characters near the camera (or the viewer you set), within your budget |
Everything |
|
Reduced |
Characters further than 25 m, or over your budget |
Less accurate physics, checked less often (by default at most 4 position and 1 velocity solver passes, and ground checks every other step). You won't notice at a distance. |
|
Animated |
Characters nobody is touching (off by default) |
Almost nothing. No physics at all, just the animation, until something touches it. |
|
Dormant |
Corpses that have stopped moving |
Nothing, until something hits, grabs, moves or knocks them. |

The settings you'll actually touch:
1.Reduced Distance: how far away a character drops to Reduced. Default 25 m.
2.Max Full Characters: a budget. Only this many get Full, the nearest ones first. A character that was just hit jumps the queue.
3.Animation Only: lets characters nobody is touching switch physics off entirely. Set it to Beyond Distance or Whenever Undisturbed.
Animation Only: great, with a catch
A character playing as plain animation looks exactly the same and still gets hit by bullets. The moment anything happens to it (a hit, an explosion, another character walking up, something rolling into it, a wall or platform in its path) it switches to full physics instantly and reacts properly.
The catch: it only looks a short way ahead along its own path for walls, props and moving platforms, and wakes up before it reaches them. Something fast coming at it from the side can reach it first, and anything lower than a step is left to the feet. So:
•Good for: shooters and cinematic games, where bullets and explosions are what move bodies.
•Bad for: physical brawlers or games where every little bump has to show.
For characters that must always be fully simulated (the player, a boss), set LOD Mode on their Active Ragdoll component to Always Full.
What counts as "in its way" is set by Animated Obstacle Layers on the LOD settings: by default every layer raycasts can hit. The floor, triggers and other characters never count. Set it to Nothing to switch the look-ahead off.
What the presets cost
The Benchmark scene has four presets on the number keys 1 to 4. With 16 characters standing around (shoves off), in the editor:
|
Preset |
Ragdoll step |
Unity physics |
|
1. Everything simulated |
3.0 to 3.4 ms |
1.4 ms |
|
2. Budget of 8, rest reduced |
2.8 ms |
1.4 ms |
|
3. Animation only when undisturbed |
0.6 ms |
0.2 ms |
|
4. Budget of 8, animation only past it |
2.0 ms |
0.8 ms |
If the characters are being shoved constantly (press S in the scene), they never stay undisturbed long enough to go animation-only, and all four cost about the same. Animation Only pays off for characters that are left alone most of the time, like background crowds.
Phones
Scene 13 Mobile shows a cheaper setup: the Mobile profile plus fewer physics solver passes. It’s not a massive performance improvement however, it only helps to get a couple of ms off without hurting the visuals too much or breaking established profiles.
Smooth motion on fast screens
If motion looks choppy on a 120 Hz+ monitor, make sure Interpolate transforms is ticked on the Active Ragdoll component. It's on by default for characters built with the wizard. If your project settings stop it working, the Console says why when you press Play and the Validator offers a fix.
10. Playing with physics
Characters live in a physics world, so loose props, moving platforms and other characters all push them around.
Loose props: should a ball knock them over?
By default, anything heavy and fast enough can start a reaction: a thrown crate or a rolling barrel. That's great for a physics sandbox and terrible for a tactical shooter where a stray bottle shouldn't drop an enemy.

Tick Numbers > Feel > Physical impacts > Ignore prop impacts in the Active Ragdoll inspector (or the profile) to stop loose props from starting reactions. They still push the body, but it won't stagger or fall from them on its own. Your hits, knock-downs and kills, and bumps from other characters, work as normal.
A hard shove can still tip a character over through plain physics. To make that rarer, raise the Toughness dial.
Characters bumping into characters
Characters running into each other can knock each other over. Which states can knock and which can be knocked is set in the Body contact reaction (chapter 7). How fast a bump has to be to count is set on the Marionette Character component: Knock Speed, Knock Transfer and Knock Recoil.
Knock Transfer: the share of a bump’s momentum (closing speed × reduced mass) that shoves the body that was run into. At 1 they meet and stop together; at 0 the bump doesn’t shove, and up to 2 it shoves harder than a stop.
Knock Recoil: the share of that push the running body feels back on its chest. At 0 the runner feels nothing; at 1 it takes as much back as the other body does.
Moving platforms and vehicles
Characters standing on something that moves (a lift or a boat deck) ride along with it. The platform has to be a kinematic Rigidbody moved with MovePosition.
•A walking character rides fine at around 0.6 m/s.
•A character just standing, without locomotion, keeps its footing up to about 0.4 m/s.
Grabbing bodies with the mouse
Scene 15 lets you grab ragdolls and props like crates with the mouse.
If your own code grabs or drags a character, tell it first with Disturb, then keep calling Sustain Balance while you're holding it, so it keeps trying to step.
Hard throws and landings
Physics runs in small time slices, 50 a second by default. A body that is thrown into a wall or dropped from a height can be moving fast enough to go from full speed to a standstill inside one slice. The joints are then slammed far past what they allow, and the body can twist itself apart. Substepping cuts that one slice into up to four shorter ones, but only when a fast body is about to hit something. Bodies that are walking, falling slowly or flying through open air cost nothing extra.
It's off by default, because most games never need it. To try it, add a Ragdoll Simulation Settings component to your scene (Add Component > Despair Physics) and set Stepping to Substepped. It's worth it if bodies in your game are thrown, shot or dropped at 20 metres a second (about 70 km/h) or more, or if you see a body come apart on impact. If your own code pushes things every physics step (a wind, a thruster), see "Stepping physics yourself" in the README: those pushes have to be added again for each slice.
One side effect to know about: Unity's own smoothing of moving objects (Interpolate on a Rigidbody) skips a slice that has been cut up. Characters aren't affected, they have their own smoothing, but a prop or a vehicle that the camera follows can hitch for a moment when a character hits something hard nearby. If you see that, the README's "Interpolation" section has a short script that keeps such an object smooth.
Scenes to play in
•14 Playground: walk a character around with W A S D, put it in any state with the number keys, and meet giant stairs, a blender, a sweeper, a wrecking ball, cannons and wandering pedestrians.
•15 Physics Interactions: throwing balls at characters, pedestrians in a pit with a slow spinning blade, and people climbing a slope while huge balls roll down it.
11. Troubleshooting
First, run the Validator (Tools > Despair Physics > Validator) and press Fix All for quick wins. It catches most of what's below.
It falls over/explodes the moment I press Play
Usual suspects, most likely first:
•An Animator left on the character. The Validator removes it.
•Physics running slower than 50 times a second. The Validator fixes it.
•The character is much bigger or smaller than a normal adult, or was scaled by hand. Press Scale to Rig (chapter 8).
•Arms or legs overlapping the body. Rebuild with a lower Limb thickness in the wizard.
•Poorly tuned profile values, specifically from Balance and Gains foldouts.
•A ragdoll built with Stand in T-pose switched off in the wizard, from a model whose default pose isn’t a T-pose. The option is on by default and straightens an A-pose, or arms and legs bent out of line, into a T-pose for you.
A big or small character steps weirdly or falls too easily
Its settings are still made for a 1.8 m person. Press Scale to Rig, and if it's still off, run the Rig Calibrator (chapter 8).
It stands but never walks
It needs Idle and Walk clips on the Marionette Locomotion component, and the walk needs either root motion or an In Place Walk Speed. The Console says which on start. See chapter 4.
The feet skate or moonwalk
Your In Place Walk Speed (or Run Speed) is off. Skating forward: lower it. Sliding backwards: raise it. Remember it's only read when Play starts.
Everything in the demo scenes is pink
The demo scenes ship one solid colour material for each pipeline (Built-in, URP and HDRP) and switch themselves to the one your project uses when you import them or change pipeline. If they are still pink, run Tools > Despair Physics > Demo Scenes > Switch Materials To Current Pipeline, or put your own materials on. The ragdolls don't care.
Red errors after importing the demo scenes
Install the Unity UI package (com.unity.ugui) from the Package Manager. The Input System package is optional.
Bodies jitter or sink into each other
The ragdoll layer has to collide with itself (the Validator fixes this), and Project Settings > Physics > Simulation Mode should be Fixed Update.
I moved the character from a script and it snapped back
Don't move a live character's Transform directly. Use Teleport instead (chapter 5).
The wizard can't find the bones
Open Bone for each part in the wizard and drag them in by hand, or tick Guess from names and check every single one (chapter 2).
Small characters suddenly explode
After Scale to Rig, this is rare: in 1,800 test shoves from 0.6× to full size, only two hard shoves at 0.6× (about 1.1 m) blew a character up, and none at 0.65× or above. A small character that was never fitted with Scale to Rig blows up far more often, so press it first. They do stand back up afterwards.
A thrown character jumps back to where it stood
The package guards against physics blowing up: a body moving faster than 60 metres a second, or spinning wildly, is taken for an explosion and stood back up where it last was. If your game throws characters that hard on purpose (mines, cannons, launch pads), raise Runaway Speed and Runaway Spin on those characters from a script. The README has the details under Troubleshooting.
A character lies down and never gets up
A downed character waits until it lies still before it gets up, and any knock while it rises puts it back down. On a conveyor belt, a slope or under a rain of props it may never get the chance. A script can call Force Get Up: the character gets up right away and nothing that hits it on the way up stops it.
On Unity 2022.3, my character slides around while just standing
On Unity 2022.3, a character that stands on its own balance, with no walking added, can slowly slide across the floor and turn on the spot, as if it were standing on ice. Nothing touched it, it isn't taking steps, and it doesn't stop by itself. The same scene on Unity 6 stands perfectly still.
What’s going on? Every physics step, Unity works out the joints and the feet on the floor in a few passes. On 2022.3 the usual six passes aren’t quite enough for a Despair body, so the feet slip a tiny bit on the floor every step. A walking character is held to its animation, which hides it. A character that is only balancing just slips, a little at a time, into a slow slide. Its legs can’t stop it: only the grip of the feet on the floor can, and that grip is exactly what isn’t worked out well enough.
Why only on 2022.3? Unity 6 gets the same job done in six passes; 2022.3 needs about twenty. Something changed inside Unity between the two versions, but exactly what isn’t known.
How do I fix it? Open Edit > Project Settings > Physics and set Default Solver Iterations to 20. That’s it. If you only want it on some characters, a programmer can call Set Solver Iterations (20, 1) on them instead. The README shows how to do that for 2022.3 only, under “Unity 2022.3: standing bodies drift”.
Do I need this on Unity 6? No. Leave the setting as it is on Unity 6.
Does it cost anything? More passes take a little more time every physics step. How much hasn’t been measured yet, so if you have lots of characters, check your frame time before and after (see chapter 9).
Will hits and falls feel different? They shouldn’t, but this hasn’t been tested at twenty passes on 2022.3 yet. If something feels off after the change, let me know.
What about far-away characters and phones? The cheaper settings for far-away characters and the phone settings in chapter 9 use four passes. On 2022.3 a character standing still at those settings may drift too. This hasn’t been measured.
Still stuck?
Join a support Discord, or email me directly. Append your Unity purchase invoice when sending support tickets over email. Please include these 5 details in your ticket -
1. Unity Version & Asset Version:
2. Rig Type & Scale (Humanoid / Generic avatar, height in m, uniform scale?):
3. Validator Result (Tools > Despair Physics > Validator: any warnings/errors?):
4. What changed from defaults? (Profile dials, custom reaction/behaviour, own locomotion, or an unmodified Demo Scene?):
5. Short video/GIF + full Console error log:
12. Glossary
|
Word |
What it means here |
|
Active |
The state of a character that is alive and on its feet: walking, standing, staggering and catching itself all count. |
|
Active ragdoll |
A ragdoll with muscles. It tries to stay standing instead of just flopping. |
|
Animation only |
A level of detail where an undisturbed character switches its physics off and plays plain animation, until anything touches it. Also called the Animated tier. |
|
Animation skeleton |
A hidden, animated copy of your character. The physics body tries to follow it, like a puppet following its strings. (Called the ghost in code.) |
|
Articulation body |
Unity's physics component for chains of linked bodies. Each of the 20 parts is one. |
|
Bake Into Pose |
An import setting on a clip's Root Transform: keeps that part of the root's movement in the pose instead of turning it into travel. |
|
Body contact |
The reaction (called Knock in code) that decides which states of a character can knock other characters over, and which can be knocked. |
|
Calibrate |
Let the Rig Calibrator shove the character over and over and tune its settings to match a normal adult. |
|
Dead |
The state of a character that is limp. It comes to rest after a while and stays there until revived. |
|
Dial |
One of seven easy sliders that move a whole group of settings at once. |
|
Disturb |
Handing a character to physics, for example when your own code grabs or moves it. Call it first, then keep calling Sustain Balance while you hold the character. |
|
Downed |
On the ground, but alive. |
|
Dying |
The state of a character that took a lethal hit and is going down, still on its feet for a moment. |
|
Fixed timestep |
How often Unity steps physics. 50 times a second (0.02 s) or faster is recommended; 30 Hz is the slowest tested. Set in Project Settings > Time. |
|
Impulse |
How hard a hit pushes, in newton-seconds (N·s). The same impulse moves a light body more than a heavy one. |
|
In place |
A walk animation that stays on the spot, like a treadmill. |
|
Interpolation |
Smoothing that draws every part between its last two physics poses, so motion looks smooth on screens faster than 50 Hz. It delays what is drawn by up to one physics step (20 ms at 50 Hz). |
|
LOD (level of detail) |
Spending less effort on characters far away or that nobody is touching. |
|
Marionette |
The name of the components underneath (Marionette Character, Marionette Animator, Marionette Locomotion). Active Ragdoll is the part your game talks to. |
|
Part |
One piece of the body: a forearm, a thigh, the head. There are 20. |
|
Profile |
A saved set of settings that several characters can share. |
|
Radian (rad) |
The unit angles are set in. 1 rad is about 57°, so 0.45 rad is about 26°. Joint angles and tilt in the settings are in radians. |
|
Reaction |
One switchable thing a character does when hit, losing balance or dying: a hand to the wound, a stagger, grabbing a wall. |
|
Reference body |
The 1.8 m, 94 kg adult the default settings are made for. |
|
Rig |
The fixed 20-part humanoid layout of bodies and joints that the wizard builds on a character. |
|
Root motion |
A walk animation that moves the character forward by itself. |
|
Root node |
The bone picked on a Generic model's Rig tab as the one that carries the character's travel (the hips). Left at None, a clip has no root motion. |
|
Scale to Rig |
One button that resizes the settings (lengths, times, speeds and forces, and muscle strength) to fit a character bigger or smaller than the reference. |
|
Seed |
A number that makes a character's random choices repeatable: two characters given the same seed and the same hits make the same choices. |
|
Stagger |
Losing balance on the way to a fall: a few tired, desperate steps. |
|
Stumble |
A running character taking a hit and running on. |
|
Tier |
One of the four levels of detail a character runs at: Full, Reduced, Animated or Dormant. |
|
Tuning |
The numbers and switched-on reactions a character runs. A profile is a saved tuning. |
|
Validator |
The window that checks your ragdolls and settings and fixes what it safely can. |
Appendix: for programmers
This manual skips the code on purpose. If you're writing scripts against Despair Physics, the README is your reference. The sections you'll want:
|
You want to |
README section |
|
Send hits, read states, listen to events from code |
Talking to a character |
|
Change settings, reactions and dials at runtime |
Tuning |
|
Walk along a NavMesh path, or write your own locomotion |
Extending locomotion |
|
Use Mecanim, Animancer or your own animation setup |
Extending locomotion, point 3 |
|
Move a character by physics from your own controls (a player in a physics game), get a downed body up no matter what, throw bodies hard on purpose |
Walking from gameplay (BalanceSteering), and ForceGetUp under Commands |
|
Set up LOD from code, read performance stats |
Performance |
|
Know what's supported between versions |
Public API |
|
Make replays or networked hits repeatable |
SetSeed under Commands |
|
Write your own reactions, or hold part of the body in a pose |
Tuning (custom reactions, posing a region) |
|
Know which units the settings use |
Units |
|
Debug a character: debug view, recorder, incident log, Profiler markers |
Debugging |
|
See what isn't supported (rig shape, Biped, small bodies, animation-only characters) |
Known limitations |
Some demo scene scripts (like the custom behaviour in scene 06) use non-public parts of the package. They work in the demos but won't compile if you copy them into your own project. Everything listed under Public API in the README is safe to use.