0 votes
asked in Rotation Limits by
edited

I am having an issue using rotation limits with the CCDIK solver. I have what I believe to be a simple setup, but I am finding that no solution is found for some positions. Here is my setup.

Three cubes. Each cube parented to the one above it. The CCDIK script is on the top cube and targets the sphere. The sphere is not in the transform hierarchy. Each cube has a Rotation Limit Hinge which limits the rotation to the X axis. The middle cube also has a 0-180 degree rotation limit applied. The intention being that the joint should only bend one direction.

Configuration of the top cube:

Configuration of the middle cube:

Configuration of the bottom cube:

As I move the target, 180 degrees of the possible positions solve as I would expect. But the other 180 degrees exhibit undesirable behavior. Here is gif showing the issue.

If I use the FABRIK solver instead, I get the same behavior.

If I remove the 0-180 limit on the middle cube all positions are solved for as expected.

My questions are:

Is this the expected behavior of the CCDIK and FABRIK algorithms? It's clearly possible to solve for the problem positions by rotating the top cube. Have I made an error setting up the system?

If this is the expected behavior. How could I use Final IK to create a system with three bones, constrained on an axis, where the middle join is only allowed to bend in one direction?

Thanks so much for any help!
- Zach

1 Answer

0 votes
answered by (20.3k points)
Hey,

Yeah, short chains and highly constrained can be a problem for CCD/FABRIK to solve, it's just the nature of those algorithms.

But a 3 bone system constrained to an axis like yours can be solved perfectly with the TrigonometricIK component.

Best,

Pärtel

Welcome to RootMotion Q&A, where you can ask questions and receive answers from the developer of Final IK and PuppetMaster and other members of the community.

Post as a guest, create an account or login via Facebook.

Please use the correct category when you post your questions.

...