Despair Physics

Documentation →

Ragdolls that stumble, catch themselves and fall for real.

An active ragdoll and balance system for Unity, built on ArticulationBody. Your characters walk on their own animation. When something hits or shoves them, the animation steps aside and a simulated body takes over: it takes real steps to stay on its feet, staggers when it can’t, falls in different ways, and gets back up. Originally built for Upper Management, my upcoming FPS.

Get notified at launch

Version 1.0 is feature complete and heading to the Unity Asset Store. Join the list to hear about the launch discount first.

What it does

It balances with real steps. A hit pushes the body, and the balancer decides where to put a foot to catch it. A light shove is a stumble that recovers. A harder one is a stagger with tiring steps and flailing arms, and a hard enough one is a fall. None of it is a keyframed hit animation.

It reacts to where and how it was hit. Each reaction is its own switchable module with its own numbers, and there are more than forty of them. A few examples:

It stays stable on real level geometry. Characters walk over stairs, slopes and ledges, ride moving platforms, and push each other around when they collide. Loose props like balls, crates and barrels can hit them, and you can turn that off per profile if you want props to push a body without toppling it on contact.

Slow motion and pause are supported. Bodies stay up under time scale 0.1 and under pause.

Shape it without learning the numbers

Seven example profiles. Default, Heavy, Light, Drunk, Injured, Realistic and Cinematic, plus a Mobile profile with the cheaper reactions switched off. A profile is a small asset: save one from a character in Play mode, share it between any number of characters, or start from one and change a few values.

Seven dials. Weight, Toughness, Coordination, Injury, Drama, Recovery and Variability. Each dial moves a whole group of numbers at once, so you can get a clumsy, a tough or a theatrical character with a slider or a single SetDial call, and it works at runtime for difficulty settings.

Every reaction has a checkbox. Switch off a reaction and it never happens, whatever its numbers say. Randomness is part of the tuning too, so a profile can be steady or loose, and you can seed a character’s random stream for replays.

Your own reactions. Write a small class, add it to a profile, and it gets the character’s events and physics steps. A custom reaction can also hold part of the body in a pose of its own while balance and hits carry on with the rest, such as arms raised to shield the head.

Setup

  1. Select a humanoid character and open Tools > Despair Physics > Setup Wizard.
  2. The wizard finds the bones, sizes colliders from the mesh, shows a preview in the Scene view, and builds the ragdoll as one undo step.
  3. Run the Validator to check every ragdoll in the open scenes and the project settings. Where a fix is safe, it has a Fix button.

Bones are found from the Humanoid avatar, or from naming presets for Mixamo, Unreal mannequin, Character Creator, Daz Genesis, VRoid, Blender Rigify, Blender Auto-Rig Pro and 3ds Max Biped. A Generic rig with no preset can be mapped by hand in the wizard.

Bring your own animations

Despair Physics is animation first. The included MarionetteLocomotion plays your Idle and Walk clips and hands the body to physics only when something disturbs it. Once the body stands still again it takes over again.

Scaling to other bodies

Tuning is set for a 1.8 m, 94 kg reference body. For a body of another size, Scale to Rig fits the numbers in one click, and the Rig Calibrator shoves the body in Play mode and tunes it further until it answers like the reference. Nothing changes until you press Apply.

Supported heights are 0.6x to 2.5x the reference. See the limits below, since the small end is the shaky one.

Performance

Every character is stepped from one manager with no garbage per step, and Profiler markers are included for each behaviour.

Measured in the Editor on a Ryzen 7 3700X (Unity 6.3), with characters being shoved at random: 16 characters cost about 2 ms of ragdoll step per physics step, 32 cost about 3.6 ms and 64 cost about 6.8 ms. The benchmark scene is included so you can test your own machine and your own target devices.

Inside the package

Where it is now

Version 1.0 is functionally ready. What is left is the Asset Store page, a trailer and a playable web demo, so you can try it in your browser before buying.

Join the list and you’ll hear first when the demo goes live and when the asset launches.

What it does not do

Despair Physics takes over when a character is hit or loses balance: stumbling, recovering and falling, all physically simulated. It is not a locomotion or animation system. For normal movement between hits, you’ll still need your own animations for the rig.

Other limits to know about:

FAQ

Which Unity versions does it support? Unity 2022.3 LTS and newer, including Unity 6. It has been built and tested on Unity 6.3. The 2022.3 code paths are in, but I haven’t tested them in a 2022.3 editor yet, so don’t count on that until I say so.

Does it work with URP, HDRP or the Built-in pipeline? The package itself doesn’t render anything, so it works with all three. The demo scenes handle materials automatically based on the detected pipeline.

Will it work with my character? It works with humanoid rigs: Humanoid avatars, the rig naming presets listed above, or a Generic rig you map by hand. The builder turns the skeleton to face the right way, poses an A-pose into a T-pose and fits colliders to the mesh for you. See the limits above for body types it doesn’t cover.

Is the source code included? Yes, the full C# source.

Does it need my animations? It plays whatever clips you give it. Idle and Walk are enough to start with, and Run and the get-up clips are optional. If you don’t have get-up clips, the package provides its own at runtime.

Does it work in multiplayer? Not out of the box, but a host-authoritative setup sending bone transforms to clients is trivially easy to make in nearly all network libraries.

Can I use it on mobile? There’s a Mobile profile and a mobile test scene with cheaper physics settings, but I haven’t measured it on devices yet. Build the benchmark scene for your target hardware and see what you get.

How much will it cost? The price will be announced at launch. People on the mailing list will hear about the launch discount first.

When does it launch? When it’s ready and approved by the Asset Store. The mailing list gets the date first.

I have a question or a feature request. Write to email. Feedback now shapes what goes into the next version.

Be there on launch day.

Get emails when the web demo goes live and when Despair Physics launches, with the launch discount. No spam, unsubscribe any time.

Join the mailing list

Contact

Unity is a trademark of Unity Technologies. Despair Physics is not affiliated with or endorsed by Unity Technologies.