Sign in to follow this  

Best practice for Ragdoll/Capsule swapping?

This topic is 2494 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently working on a game and multiplayer game engine for my company. We've chosen to roll our own as our primary design goal is to reduce the opportunity for cheating, and none of the low-cost engines I found were hardened in any way. So, I'm building our engine out of Ogre3D, Bullet, and RakNet.

One question that's bothering me is how to handle ragdolling on death. My initial assumption was that we'd represent characters as capsules in the physics system. However, for physics-driven ragdoll animation, I need to set up separate rigid bodies for each bone and connect them with constraints. But, if I do that from the start, I'm pretty certain character movement will become downright impossible to deal with.

So, what's the best practice approach to handling this? Do I represent the characters as capsules throughout regular gameplay, then swap them for the ragdoll representation on death? I'm afraid that swapping them will result in a stutter. What if I want to swap back and forth between representations--a character is caught in an explosion, ragdolls across the map a ways, then stands up to continue fighting?

Share this post


Link to post
Share on other sites
[quote name='Netzapper' timestamp='1298131080' post='4776329']
Do I represent the characters as capsules throughout regular gameplay, then swap them for the ragdoll representation on death? I'm afraid that swapping them will result in a stutter.[/quote]
I haven't implemented ragdolls in my own projects, but I would imagine that this is definitely the way to do it (unless you were using something along the lines of HumanIK like Assassins Creed). I also wouldn't be too worried about swapping causing stuttering - this probably isn't a particularly intensive operation, especially when you consider the work involved in the physics simulation itself. Certainly before worrying about that, you should create a proof-of-concept and benchmark/profile it.

The issue of transitioning back out of a ragdoll state without snapping to a generic "fallen" pose looks to be a bit more complicated... Maybe someone with more experience in animation blending/IK can weigh in on this one.

Share this post


Link to post
Share on other sites

This topic is 2494 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this