How do I get the compression on specific dynamic body

Posted by Mike JM on Game Development See other posts from Game Development or by Mike JM
Published on 2013-02-26T20:52:43Z Indexed on 2013/11/07 4:16 UTC
Read the original article Hit count: 411

Filed under:
|
|

Sorry, I could not find any tag that would suit my question.

Let me first show you the image and then write what I want to do:

enter image description here

I'm using box2D. As you can see there are three dynamic bodies connected to each other (think of it as a table from front view).The LEG1 and LEG2 are connected to the static body. (it's the ground body). Another dynamic body is falling onto the table. I need to get the compression in the LEG1 and LEG2 separately. Joints have GetReactionForce() function which returns a b2Vec, which in turn has Length() and LengthSqd functions. This will give the total sum of the forces in any taken joint. But what I need is forces in individual bodies that are connected with joints. Once you connect several bodies with a single joint it again will show the sum of forces which is not useful.Here's the case iI'm talking about:

enter image description here

© Game Development or respective owner

Related posts about collision-detection

Related posts about ios