Anyone happen to know why my arms are bending inwards?
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.
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.
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!
+1 to the FPS drop issue as well 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?
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?
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.
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.
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.