Jump to content


- - - - -

Rigid body dynamics


3 replies to this topic

#1 Vasco_F

    New Member

  • Members
  • Pip
  • 2 posts

Posted 14 June 2006 - 06:28 PM

Hi,

I'm developing a video game, in which I'm making a charactar with rigid-body physics (also known as "ragdoll" physics). The way I've made it is probably not completely realistic, because I only use velocity vectors to calculate the position of each joint of the "ragdoll", based on an initial velocity vector applied to a joint.

If you want to check it out, you can download it here.

The way I do this is illustated in this image:
Posted Image


Anyway, the problem I have now is how to calculate the velocity vector of joints that make an angle that is restricted (an angle that shouldn't get any bigger, for example). This simplified diagram illustrates my problem:
Posted Image

In the diagram, how should I calculate vectors v1 and v2? Note that in the diagram, the entire body should be rigid, because of the angle restriction.

I would truly appreciante any help on this...

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 5308 posts
  • LocationSanta Clara, CA

Posted 14 June 2006 - 06:36 PM

I'm not sure this problem can be solved only using a velocity-based representation without forces. I would advise you to read this Gamasutra article, which is about ragdolls (requires free registration).
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 Vasco_F

    New Member

  • Members
  • Pip
  • 2 posts

Posted 15 June 2006 - 08:44 PM

Thanks, if I can't solve the problem this way I'll try that ;)

#4 SigKILL

    Valued Member

  • Members
  • PipPipPip
  • 200 posts

Posted 15 June 2006 - 09:21 PM

Have you tried using straight forward lagrange multipliers? I´m not seeing any reason why this should not work in a velocity based system (typically can equation based algortihms be used either way). Since your ragdolls probably doesn´t containt loops you can look for baraff´s paper called "Linear-time dynamics using Lagrange multipliers" which provides a pseudo code that does this in linear time (in a force based system, but if you know your physics I believe it should be quite easy to convert those formulas).





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users