Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using verlet integration to simulate some tentacles. So far it works great and I am satisfied with how it looks in general. Here is how a tentacle is built:

tentacle structure

The very stiff sticks are colored red, in addition I added angular constraints of 180° in order to keep everything together.

But still, sometimes this happens:

the problem

When forces are too big at the peak, it flips around and gets stuck in a very ugly state.

Of course I could increase the number of iterations for satisfying the constraints, but then the tentacles get too stiff and the performance suffers.

What can I do about this? Some ideas:

  • add more points at the peak
  • more constraints overall
  • limit possible forces
  • maybe rethink my tentacle design completely?
  • detect flip over and undo it
share|improve this question
Insufficient detail. Are you looking for robotic or organic movement? Do the struts also correspond with a collision bound, or is this just a background element? (In its current form, the issue can be taken to almost arbitrary complexity.) – Anko Mar 9 '13 at 18:02
up vote 2 down vote accepted

Rather than building a solid object for your tentacles, I would suggest instead using a single linear chain — a 'skeleton' for the tentacle — and then procedurally wrapping a descending sequence of trapezoids around it, out to the tip. Use the local orientation information to define crossbars at each vertex (e.g., normal to the average or possibly weighted average of the two skeleton segments that share that vertex) and then define the 'body' of the tentacle using quadrilaterals built from one crossbar to the next all the way out to the tip. You'll want to use slightly more clever physics for your skeleton — in particular, the curvature constraints should be tighter near the base of the tentacle than at the tip, to account for the thickness at the base — but this approach should still give you realistic motion without having to worry about keeping the outer structure consistent. With a little care you can even use an approach like this to simulate contact with the tentacle, by 'backsolving' the force on the surface of the tentacle to an appropriate force or impulse on the tentacle's skeleton.

share|improve this answer

Tentacles work in nature (and robotics) because of muscles inside, this means that each segment or three is only locally affected by a small number of forces. It sounds like you have a setup where all the force starts at the base and propagates outwards, which gets you a whip instead of a twisting tentacle.

You may want to build a system with small forces between nodes that will mimic muscles, then have a "brain" animate the forces by propagating over time.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.