Hello there, I’m @dthecoolest and this is my third open-source project which I made to contribute back to the community.
Credit
One of the main reason this project is open-source, couldn’t have done it without them:
@JohnathonSelstad - Blogger who posted the tutorial of Psuedo-Code of CCDIK check out the inverse kinematics on his website on GitHub it’s very cool.
@EgoMoose - The rotation between two vectors trick really come in useful and helped when translating Unity code to lua code. Roblox pls add CFrame.fromToRotation like unity Quaternion.FromToRotation.
Quenty - Maids class for general cleaning
Sleitnick - VectorUtil
Showcase
Leg does work
The notable feature: being able to handle hinge constraints:
Vs Fabrik:
Send Help
Assets
The module script:
https://www.roblox.com/library/6204935490/CCDInverseKinematicsController
Github repository with the place file go check it out:
What is it?
After being disappointed with FABRIK for being unable to handle hinge constraints and the lack of easy documentation to implement constraints other than EgoMooses google doc method I searched online for a new method and I found @JohnathonSelstad blog post on it which explicitly says that this new algorithm works for hinges and the blog post is amazingly well made so yeah I had to try it out.
How does it work?
Uhh just look at the website made by @JohnathonSelstad, he posted the pseudocode of the CCDIK algorithm and it’s interactive as well, go drag that robot arm on his website powered through javascript. Plus there’s also a lot of cool algorithms like orthonormalization on there check it out.
Otherwise, this image should illustrate the rotation happening with each joint which rotates from the direction towards the end effector towards the goal position.
How do I use it?
Documentation and tutorial is now available!:
Attribution
The project is MIT licensed feel free to fork and make edits to it. The model provided in GitHub is usable but well extremely resembles a mech in another video game so for maximum safety use your own rigs to avoid copyright.
Future of the project
Bug fixes.