Breakable Chain - best way to implement this requirement

sean.thurston
Total Points:
8,322
Status Points:
0
Brown Belt
October 13, 2008 7:06 PM PDT
Rate
 
#2 Reply to #1

Hi mxms,

Cool video, I like the weird kind of art-style you have going there with the sun.

Unforturnately, this is kind of a bad case scenarios for constraints. You have long, thin chains that are using ball and socket constraints which limit translation, but not rotation. Then you are going to tangle a few of them up.  I could see this becoming unstable pretty quick due to angular forces.

If you want to be able to break the constraints, then you can't really use a constraint chain. You need to use a chain of constraints. Here is some advice on this:

1) Try to limit the number of constraints you using. Try to use a lower level of detail in the physics rope and interpolate positions in the higher quality graphics rope. Less is always better. I imagine you will probably use capsules for the rigid bodies.

2) Read the section about stabilizing constraints in the docs. Havok Physics->Havok Dynamics->Constraints->Tuning and Tweaking Constraints.

3) In order to control the chain, put a rigid body that represents your kite at the end. Attach the chain to the "kite" and then keyframe it. Moving the kite will make the chain move with it.

4) The constraints are going to be between rigid bodies, so you should be able to do damage in a similar way to how other games do damage. Just do collision detection between the rigid bodies. Make sure to filter out collisions between rigid bodies in the same rope.

5) Use MOTION_STABILIZED_BOX_INERTIA or MOTION_STABILIZED_SPHERE_INERTIA for the rigid bodies in the rope.

6) For breaking the link, it might be best to just remove the contraint. This doesn't really work with a hkpConstraintChainInstance.

Hopefully this will at least get you started. This is probably going to be pretty difficult to work out.

Let me know how it goes.

Thanks,
Sean




Intel Software Network Forums Statistics

8474 users have contributed to 31606 threads and 100656 posts to date.
In the past 24 hours, we have 30 new thread(s) 109 new posts(s), and 163 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member Kevin Johnson