Inverse Kinematics Control Instance for animation is now in Beta!

Anyone happen to know why my arms are bending inwards?

image

Currently I’m sitting in a seat.

local replicatedStorage = game:GetService('ReplicatedStorage')

local modules = replicatedStorage:WaitForChild('Modules')
local lib = modules:WaitForChild('Library')
local string = require(lib:WaitForChild('String'))

local module = {}

function module:AddTarget(character: Model, bodyPart: 'LeftArm' | 'RightArm', target: Attachment, includeTorso: boolean)
	assert(bodyPart == 'LeftArm' or bodyPart == 'RightArm', 'Failed to add target because BodyPart ' .. tostring(bodyPart) .. ' is invalid!')

	local humanoid = character:WaitForChild('Humanoid') :: Humanoid
	local ikc_ThisArm = (character:FindFirstChild('IKC_' .. bodyPart) or Instance.new('IKControl')) :: IKControl

	ikc_ThisArm.Name = 'IKC_' .. bodyPart

	local side, bodyPart = select(1, unpack(string.split(bodyPart, '%u%l+')))
	ikc_ThisArm.ChainRoot = if includeTorso then character:WaitForChild('UpperTorso') else character:WaitForChild(side .. 'Upper' .. bodyPart)
	ikc_ThisArm.EndEffector = character:WaitForChild(side .. 'Hand')
	ikc_ThisArm.Target = target
	ikc_ThisArm.Pole = (target.Parent :: Instance):FindFirstChild(target.Name .. 'OUT')
	ikc_ThisArm.Parent = character
end

return module

I’ve two attachments, one called “IK_Left” for the left arm, “IK_Right” for the right, and then I have two additional attachments who have the same name but with a suffix “OUT”, yet the arm appears to bend wrongly regardless of whether the pole is specified or not. I’ve also tried moving and rotating the out attachments to no avail.

4 Likes

I couldn’t get R6 working and as I see from other replies no one could get it working could you tell or show us how to make it work?

With the new update my solution worked you can make R6 work by adding a extra limb to the end of the body part you want to use as end effector. Select the additional limb “part” that you added as end effector (dont forget to align it perfectly outward of the body part) and select the body part as chain after that it should work. And IKControls lags my game too much while play testing in the studio and I just test it with two IKControls not like sixteen (which is the max limit of my game can have cause of the server size etc) big optimization issue.

2 Likes

cant seem to get it working for any rigs other than r15 :space_invader:

1 Like

I’ve been getting massive FPS drops when I enable the IK controllers. A few days ago this didn’t happen, but I was wondering if this was a known issue before I make a detailed bug report. (I can DM the report or message it to the bug report group)

Other than that, once poles are added (or re-added I should say) this feature would be perfect!

5 Likes

it works try sending more details about what u are trying to do

1 Like

How would I go about making feet reacting to the environment?

1 Like

Watch how to make procedural animations for unity u might understand from that and apply it to roblox

3 Likes

Have seen the same thing, noticed yesterday. FPS drops to single digits when IK is enabled.

4 Likes

+1 to the FPS drop issue as well :raised_hands: also can pinpoint the issue is related to dummy humanoid contains saved IK animation keyframe and removing those animation keyframe from workspace solved the FPS drop issue

Also, would like to ask about the approximate timeframe that we can use IK control instance in live game and not only in studio? :man_bowing:

1 Like


cool lol.

6 Likes

This is handy for making doors more immersive!

12 Likes

Hi, thank you for your feedback. We’ve recently released an update that should fix the issue you were having with your own rig with motors, please check if it now works for you.

When you say “no bones in the chain”, do you mean having EndEffector same as ChainRoot or EndEffector the direct child of ChainRoot in the rig?

2 Likes

Glad you fixed it. We’ve released an update that makes the place you provide work properly.

1 Like

I unfortunately cannot give an exact date by when we’ll release this, but we’re working on getting this out ASAP.

3 Likes

Could you provide privately a .rbxl so I can have a look at what’s going on?

1 Like

We’ve released an update that fixed issues with custom rigs. Please try again and let me know if it works. You should make sure that the IKControl is under your Humanoid or AnimationController and that there is an Animator present.

1 Like

This is a great point. We’re still working on tuning performance and making the ik solver run in parallel. The goal is to make it as lightweight as possible to enable 100s of IKControl enabled at the same time. We have a way to control the number of iterations behind the scenes based on animation Lod, we’re still discussing if we should expose it. On one hand that gives developers more control, but it makes it also more daunting to use.
You’re correct, it’s iterative and we’re using different solvers based on the setup, currently FABRIK and CCD.

2 Likes

Thank you for the feedback! In case you have more details on what didn’t work as well as you were expecting please share them so I can improve them, thanks.

1 Like

Please try again and lmk if it works, we’ve recently released an update that fixed issues with custom rig setups.

1 Like