Inverse Kinematics Version: Experimental Testing
(This topic was separated from the suggestion of a Community Sage)
I am releasing two modules that are mostly complete and generally only for more advanced scripters. (The other modules are linked below this thread)
Inverse Kinematics (sort of incomplete)
This IK solver is based on the FABRIK algorithm which I was able to get working with conventional bones in Unity and Unreal Engine. To preface this section, this is currently not a replacement for your current rig setups. I have not found a way for it to accurately work with Motor6Ds yet due to my inexperience working with those particular objects. This is why I am abandoning the system since no one was able to help me on the issue. It comes feature-complete with pole targeting and chain length. Expect bugs since it is incomplete (not as much though since it’s pretty much tested). This module is meant for learning the algorithm and using it for your own work.
It also includes an incomplete procedural animation creature to showcase how it works.
Sample IK Solver Module code
local ChainLength = 3 local RootLimb = workspace.Creature.LeftForeLeg.Knee.Foot local IKLimb = IK:CreateIK(RootLimb, ChainLength) IKLimb:SetTarget(workspace.Target) IKLimb:SetPole(workspace.PoleTarget) IKLimb:Update()
Procedural animation is an alternate way of animating your rigs. Instead of using conventional keyframes, you will tell the computer where to move the limbs instead. It is also different from conventional CFrame animations because they aren’t set in stone either. The procedural sample creature that the IK solver comes with uses the most basic knowledge of procedural animation logic. It is far from smooth or perfect, but the way to do it is the same.
The IK Solver is great as it automatically positions where I want my limbs to rotate. I would then raycast downwards from where my creature foot is to see where the ground is, and place the target in the position of the ray. My Pole Targets are parented to the body of the creature so it will always stay in the right place. When the creature moves, the targets will also move along with it. The foot will stay planted until the targets get too far. Then we can adjust the foot to move to the new target position. This creates the “walking” animation. This is just one example of what you can make with procedural animations.
You can get the IK solver alongside the creature here. Alternatively, you can download the place file here containing both my pooling system and IK w/ creature. Scripts are in workspace.
PoolingAndIK.rbxl (27.5 KB)
My other modules:
Raycast Hitbox Module
Part Pooling - Increase performance with lots of parts