Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

orbano

Rigid Body Hierarchy

This topic is 5332 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 want to build an object hierarchy of rigid bodies, so bodies can stick together to form a greater body, and fall apart, if a force tears them apart. Does anyone know any tutorials on this? I really need to know the data strucure, and a few algorithms for that to ditribute forces and torque. I was planning to implement an N-Tree for this, objejcts being leafs, and roots being connections/vitual objects (for localising collision). Please help! "Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin

Share this post


Link to post
Share on other sites
Advertisement
it depends on what you are talking about really... could u be a bit more precise? (can any body stick to any another body or only certain ones that fit together? can 1 body stick to more than 1 other body? is there a main body that all other will stick to? etc...)

Share this post


Link to post
Share on other sites
If you use a force vector for each member of the body then you could simply test if the force (distance from 0,0 to point) is greater than some collapsing point and then deattach it from the body.

Share this post


Link to post
Share on other sites
they can stick together through special objects, that stick them together (magnet, glue, etc). Forces are delivered from one sub object to other through these. They calculate, if the applying torque tears them apart (in subobject->main object direction they simply deliver the forces, then the torque is applied to the whole body, and then distributed to the subobjects).
The whole construct is similar to the construction of dynamic bounding boxes (i use a collision detection algorythm like that), but it would be also used for physical calculations.
When 2 objects stick together, a root object is created, that represents the 2 objects together, with a common center of mass, common bounding polihedron. When detecting collision, first, the collision is calculated with this common body, then localised to one of the subobjects. The applying force is calculated, and sent back to the root. It calculates the torques (how rotation and translation is affected), and sends it to the subobjects, so they can calculate, how big force is applied to the connection.

i hope you understand it, you know my english...

"Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!