Breakable Chain - best way to implement this requirement
Hi,
I've been playing around with Havok (5.5) since it was released this summer and have decided to integrated with a unique game we're working on.
Its basically a kite flying game, but not one with stunt kites and tricks. Its a networked multiplayer kite combat game. We're using Ogre 3D, Raknet, and have integrated the WiiMote for more realistic interaction with the kite rope. We already have a demo of this without the use of physics at all, but it doesn't look as good.
Here's what we're looking for:

[A] Whats done so far: Rendering a kite string. I've been able to do this using the hkpConstraintChainInstance like in the Ball and Socket Rope demo. I am querying the position of the last sphere in the chain and setting it as the position of a kite model every frame.
What we need to do: The user's input directly affects the movement of the kite. I'd like to be able to give any arbitrary position to the kite model, and have the chain instance end at that position. I believe objects set as Keyframed are able to behave like this. What is the best way to achieve that behaviour for the rope?
[B] In the game, we have a maximum of two players fly their kites with each other. We need to be able to: - Have collision between the kite strings. - Keep a track of which links in the rope are colliding so what the associated link health can be reduced.
[C] From [B] above, when a particular link's health depeletes completely (could belong to either kite), we need that link to break. The effect would be similar to whats shown in the image. Again, I would like to know the best way to implement this.
The only thing I've acheived so far is to take the rope similar to the Ball and Socket Rope demo, and attach a kite mesh to one end. I just wanted to be pointed to the right direction for the rest of the features in [A], [B] and [C] in terms of what type of constraints I should use, if there are other classes similar to hkpConstraintChain that could be useful, etc. If you could let me know which of the Havok demos I should look at, nothing like it.
Thanks for your time, Varun.
|