Inverse Kinematics Module - Easy Solver

But what exactly does they do?

ā€¦its an inverse kinematics solver - you can see the gifs/videos to see what exactly it can do

I wish hereā€™s a tutorial video of it, itā€™s pretty confusing to use :S

4 Likes

Thatā€™s really cool, nice job. I think you got this idea from this one dude who used inverse kinematics in unity and recreated it in roblox, now thatā€™s cool.

1 Like

Why did you cache a lot of the cframe and math lib functions is it really that hard to just write it?

Itā€™s not about how hard it is to write, itā€™s because of the way I script. I usually cache variables for simpler use, and faster scripting.

Is there a way to get it worked on the npc like battle droid?

Yes-- using the IKModule.new() function, you can create an IK class for an NPC.

1 Like

Nice module, but I want, to ask, how did you make the soft movement, like Sourceā€™s?

You can check the source code. You should see the leg code in StarterPlayerScripts.

Iā€™ve modified the code so it doesnā€™t do that for the arms. I even uploaded it as a free model. (With credits to this original forum post) You can find it here: Inverse Kinematics (R15) [Sprinting Included] - Roblox

2 Likes

Oh okay ty also it wonā€™t messed up the arms when use tools?

This may become obsolete in the future unless you update it, as I am currently working on a huge overhaul to separate the automatic leg cycling and fixing some issues that may come alongside it.

2 Likes

Hi, I have a quick question about how the module works.

I saw another video with similar code that went a bit more in-depth about a similar program, and inside both that video and inside the module you provided there are these lines of code

	local theta1 = -math.acos((-(b * b) + (a * a) + (c * c)) / (2 * a * c)) --  gets the angle opposite b
	local theta2 = math.acos(((b  * b) - (a * a) + (c * c)) / (2 * b * c)) -- gets the angle opposite a
	return plane, theta1 + halfpi, theta2 - theta1

I understand how these are gotten from the law of cosine, but if the triangle is like this:
Help.bmp (2.8 MB)
Shouldnā€™t you be trying to get theta and Omega (poorly drawn but itā€™s the shoulder angle) instead of theta and gamma?

Basically, I would be really grateful how you use the angles at theta and gamma to determine the angles the roblox characterā€™s shoulder and elbow need to be at.
Thanks in advance.

1 Like

Sadly, I have no real understanding of how the moduleā€™s math works, as seen in this quote:

This is only something Iā€™ve made modular enough for easy accessibility of adding inverse kinematics into games, so I cannot help you.

1 Like

Oof.
Thank you for your time anyway, Iā€™m sure ill get great use out of this module nevertheless.
I usually just like to have a somewhat basic understanding of any program I use.

1 Like

It wonā€™t, since the arms before I modified them were CFramed.

Works with any arm animations, hereā€™s a video from a few months back that I have demonstrating it: Inverse Kinematics Test (Sprinting Included) [READ DESCRIPTION] - YouTube

1 Like

I donā€™t quite understand how to use your module, I stopped at the example that you gave above, and I canā€™t understand anything else, please explain how to use it a little deeper.

I see that detach is a boolean but what exactly is its purpose? Is clamp making the limits for how much you can bend your joints?

Edit: I realized it literally means that my limbs detach to reach the position. The remaining question is ClampA and ClampB.