link between 2 softBodies ?

User avatar
majestik666
Posts: 66
Joined: Tue Mar 02, 2010 6:13 am

link between 2 softBodies ?

Post by majestik666 »

For our purposes, we need to be able to link
one softbody to another (like linking 2 ropes together)
so I implemented a link using the appendLink(node *,node *)
each node * pointing to a node in a different softBody,
it looks like it's working fine, am just wondering
if there is a solver limitation somewhere or if it's going
to come back and bite me when I don't want it ? :)

Also when creating the link am creating one link each way A->B and B->A
in order to get a link in the m_link of each softBody.

Has anyone played with that or know any problems with this ?

Cheers
F
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: link between 2 softBodies ?

Post by Erwin Coumans »

That is an interesting usage of links, although the API was not intended for it. The OpenCL / DirectCompute accelerated version might not support this.
If the softbodies use collision clusters, there is a reference frame to attach constraints, but I suppose in your case you are not using collision clusters.

The solver is iterative, so it might just work fine. If you run into issues, please let us know so we can develop a more robust method to attach two softbodies.
Thanks,
Erwin
User avatar
majestik666
Posts: 66
Joined: Tue Mar 02, 2010 6:13 am

Re: link between 2 softBodies ?

Post by majestik666 »

Hey Erwin,

I've been playing a bit more with it and doesn't seem to cause the solver
much trouble, I was running a net of ropes (10 in each direction X/Z)
so 100 links (x2) between the ropes and it was running smoothly and very stable
at 200fps :) so am pretty happy with it
I was just wondering cause it felt that the way of doing it was a bit of a hack :)

Cheers!
Francois