IKB - Inverse Kinematics Bundle

IKB

Simple, Lightweight, and Performant IK Bundle

About :placard:

As the name implies, it’s an I nverse K inematics B undle, containing modules for common IK implementations, currently supporting R6 and R15 rigs, with more coming soon!

Purpose :performing_arts:

Makes IK simple and easy to implement for common use cases with little to no knowledge about the math and logic behind the library itself, as well as keeping itself lightweight, and causing little to no impact on the CPU.

Performance :zap:

Module Method Runs Calls Avg. Runtime
R15.AL :Solve() 1,000 10,000 28.1ms
R6.Arm :Solve() 1,000 10,000 18.0ms
R6.Leg :Solve() 1,000 10,000 14.5ms

Credits :medal_sports:

Installation :building_construction:

Source :scroll:

Getting Started :open_book:

R15
local R15ALIK = require(script.IKB.R15.AL) -- "AL" stands for "Arm & Leg".
local LeftArmIK = R15ALIK.new(Character, "Left", "Arm")
LeftArmIK.ExtendWhenUnreachable = true -- Move body part when it normally cannot reach (do not include this line if you don't want this behavior).
LeftArmIK:Solve(Target.Position)
R6
local R6ArmIK = require(script.IKB.R6.Arm)
local LeftArmIK = R6ArmIK.new(Character, "Left")
-- Note: R6 does not support "ExtendWhenUnreachable" behavior yet.
LeftArmIK:Solve(Target.Position)

Example.rbxl (42.8 KB)

License :judge:

MIT License

40 Likes

Wow! This simplifies a lot for me! I’ve always struggled to implement IK in quite a few instances so thanks for this!

Also +1 for the MIT license!

1 Like

Looks great, does it support animations?

Could you elaborate on this further? You could animate the rig and leave the parts that you want to use for IK.

I believe its called animation blending iirc, but yeah that works for my purpose too. Great module

1 Like

R15 Support + Minor Optimizations

Version: 1.0.0 → 1.1.0
Scale: Minor

Changes :chart_with_upwards_trend:

  • R6 leg solver is slightly faster thanks to CFrame creation optimizations.
  • Removed redundant variable in R6 leg solver.
  • R15 Arm & Leg (AL) solver has been implemented.

Known Issues :bug:

R6 solver has some edges cases where it throws wonky output. If anyone knows how to fix let me know as I am not an expert when it comes to inverse kinematics.


Learn more by visiting the GitHub repository.

I had the same problem using R6 IKPF (Inverse Kinematics Procedural Footplanting)
Basically at certain angles, the legs were wonky or weird looking. This is because the IK method they were using was:

So my best guess why the legs doesn’t solve perfectly is because of your IK solver.
(Correct me if I’m wrong)

i hope this helps in any shape or form.

Where should you put the scripts?

In any place you want. I personally recommend to put them in PlayerScripts since you won’t be solving IK on the server.

Destroy Method Fix

Version: 1.1.0 → 1.1.1
Scale: Patch

Changes :chart_with_upwards_trend:

  • R6 leg and R15 AL solver now restoring C0 CFrame of joints as intended when calling the :Destroy() method.
  • R6 arm now properly restoring C0 CFrame of joints when calling :Destroy() method.

Learn more by visiting the GitHub repository.