Info
This post was imported from a personal note. It may contain inside jokes, streams of consciousness, errors, and other nonsense.
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:
And here’s with no IK at all.
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:
- I move the detaching segment, rotating it away from the surface.
- 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.
- 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.
That’s so awesome.
Damn, I gotta figure out what to do at the end there.
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.