# Rigid body phyisics

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

## Recommended Posts

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: Diagram1 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: Diagram2 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...

##### Share on other sites
This is fairly simple. As you've illustrated it, both links are rigid linked, due to one angle being maxed. So, if there is no rotation, V1 and V2 are identical to the known V, e.g., V1 = V2 = V.

Now, lets supposed that the whole thing is rotating with an angular velocity, w (radians/sec). Note that w is a vector. Still hold the two links to be rigidly linked---the angle remains at its max setting. In this case, you have to include the rotation in the computation of the velocities V1 and V2. Here's how you do it, using a kinematic relationship:

1) Let r1 = the vector from the point with the known velocity to point 1, which has velocity V1

r1 = location_of_point_1 - location_of_point_with_known_velocity_V

2) Compute the contribution of rotational velocity onto the translational velocity of point 1. 'x' means cross product

   V1_rot = w x r1

3) Assign the translational contribution:

   V1_trans = V

4) Add them together to get the full translational velocity of point 1:

   V1 = V1_trans + V1_rot...or...   V1 = V + (w x r1)

That is all! Do the same thing to find V2. The difference will only be that r2 is different from r1.

##### Share on other sites
Thank you! Just one thing though, how do I calculate w? Can I calculate it like this?

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633722
• Total Posts
3013549
×