Skip to main content

Inch Worm Slack Achievement Unlocked

·245 words·2 mins

Info

This post was imported from a personal note. It may contain inside jokes, streams of consciousness, errors, and other nonsense.

image Wow, I finally figured it out. The key was to do IK from the tip to the base.

Here’s what it looks like when I do IK from base to tip: image

And here’s with no IK at all. image Real plot twist at the end there.

I thought I was gonna need to do IK tip to base _and_ base to tip but I guess I already move the segments with the detaching segment.

So it works like this:

  1. I move the detaching segment, rotating it away from the surface.
  2. When I do so I rotate the segments between the detaching and attaching segments as well. At this point there will be a gap just before the attaching segment.
  3. I use inverse kinematics to close that gap, bringing the last segment of slack to fit the attaching segment.

Awesome. That’s been a while coming.

Here it is with the tentacle length I’ve been using for debugging. I just used a long one above so I could better see the result. image That’s so awesome.

Damn, I gotta figure out what to do at the end there. image Oh, I guess I can just continue the attaching algorithm and probably run the same IK from the base to the attaching segment.

I finally started using Processing’s debugger a few sessions ago. It was crucial for troubleshooting the algorithm.