Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ashleve/activeragdoll

From-scratch implementation of physically simulated character animation with proportional-integral-derivative controllers (PID)
https://github.com/ashleve/activeragdoll

active-ragdoll animation character controller force humanoid-characters inverse-dynamics inverse-kinematics physics pid ragdoll simple simulation unity

Last synced: about 14 hours ago
JSON representation

From-scratch implementation of physically simulated character animation with proportional-integral-derivative controllers (PID)

Awesome Lists containing this project

README

        

# ActiveRagdoll
#### Implementing active ragdoll from scratch for humanoid characters in Unity

![](gifs/active_ragdoll.gif)

## What is this?
#### This is a simple third person controller for active ragdoll driven by static animations.

It uses similar techniques as games like [TABS](https://www.youtube.com/watch?v=Z2e9vd3Znz4).

It's designed to be as simple as possible.

![](gifs/balls.gif)

## How does it work??
#### TL;DR: a [PID controller](https://en.wikipedia.org/wiki/PID_controller) applies forces to ragdoll to make him follow static animator (skeleton in the gif below).

[`AnimationFollowing.cs`](https://github.com/hobogalaxy/UnityActiveRagdoll/blob/master/Assets/ActiveRagdollScripts/AnimationFollowing.cs) applies animation following.

[`MasterController.cs`](https://github.com/hobogalaxy/UnityActiveRagdoll/blob/master/Assets/ActiveRagdollScripts/MasterController.cs) contains all 3rd person controller logic. It makes sure static animator can't move too far away from ragdoll.

[`SlaveController.cs`](https://github.com/hobogalaxy/UnityActiveRagdoll/blob/master/Assets/ActiveRagdollScripts/SlaveController.cs) controls behaviour of animation following in real time. It makes ragdoll loose strength when colliding with other objects.

![](gifs/skielete.gif)