Constraints

Published February 23, 2010
Advertisement
I've started to do some preliminary prototyping for my next project, and one of the things I need is (very basic) ragdolls. So over the next few entries we'll be following the buildup to get there.

My first thought was that, given ragdolls are pretty complex animals, that I'd have some Ragdoll controller which just did everything, and have the physics code recognise it and do ragdoll stuff. This should make it super easy to switch them on/off, as you'd just enable/disable that controller. But obviously, this is a pretty specialised solution, and doesn't get me any closer to doing similar things like rope bridges, swinging signs, bobbing pony tails, wobbly trees, etc. So I parked that for a bit, and decided I'd start off by adding support for building generic physics systems in objects - and see how this handled ragdolls before adding anything ragdoll specific.

Based on this, I've set about adding basic support for some simple constraints, starting with a ball joint. There's been a truly staggering amount of work behind the scenes to get them in (starting with re-writing the Constraint management system used for contacts to handle permanent constraints, and ending up having to re-write some nasty corners of portals and serialisation to handle serialisation of object references within other objects). But it all seems to be working now. Here's a little video of them in action. You can see that the switch is hooked up to drive the "strength" of the top constraint that attaches the block chain to the floating block, so that turning the switch on and off is like turning on a magnet.

Disabled

I added an "Elasticity" parameter to the constraint, which is why the block chain is a little bit springy. You can turn this off, but it doesn't feel quite a "fun" when they're totally instant and infinitely strong.

The next step is to extend Skeletons so you can use constraints within the bones of a skeleton ... makes me feel sick just thinking about it really.
Previous Entry Moose
Next Entry Moose Sighting
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Moose Sighting

1395 views

Constraints

1564 views

Moose

1297 views

Melon Golf

1856 views

Toon

1359 views

Spaceships

1110 views

Rendering Pt2

1201 views

Hardware Shaders

1241 views
Advertisement