代码示例
IKControl 设置
local character = script.Parent.Character
local humanoid = character.Humanoid
local root = character.HumanoidRootPart
-- 创建一个新的附加物以用作 IKControl.Target
local target = Instance.new("Attachment")
target.CFrame = CFrame.new(-1, 0, -1)
target.Parent = root
local ikControl = Instance.new("IKControl")
ikControl.Type = Enum.IKControlType.Position
ikControl.EndEffector = character.LeftHand
ikControl.ChainRoot = character.LeftUpperArm
ikControl.Target = target
ikControl.Parent = humanoidAPI 参考
属性
方法