im setting up inverse kinematics for my character; i wanted to put an offset on the IK attachments on the z axis but its applying it to the x axis. im so confused; why is it doing this?
my offset is:
local footSurfaceOffset = Vector3.new(0,0,5)
local maxRayDown = -15
local footSurfaceOffset = Vector3.new(0,0,5)
module.setupIKControllers = function(c)
local h = c.Humanoid
local defaultHipHeight = c.Humanoid.HipHeight
module.LeftIKController = Instance.new("IKControl", h)
module.RightIKController = Instance.new("IKControl", h)
module.LeftIKController.Name = "LeftIKController"
module.RightIKController.Name = "RightIKController"
module.LeftIKController.ChainRoot = c.LeftUpperLeg
module.LeftIKController.EndEffector = c.LeftFoot
module.RightIKController.ChainRoot = c.RightUpperLeg
module.RightIKController.EndEffector = c.RightFoot
--setting up ik's
module.LeftIK = Instance.new("Attachment", c.LeftFoot)
module.RightIK = Instance.new("Attachment", c.RightFoot)
module.LeftIK.Name = "LeftIK"
module.RightIK.Name = "RightIK"
module.LeftIK.WorldPosition = c.LeftFoot.Position + footSurfaceOffset
module.RightIK.WorldPosition = c.RightFoot.Position + footSurfaceOffset
--assigning targets
module.LeftIKController.Target = module.LeftIK
module.RightIKController.Target = module.RightIK
end
and they’re ending up here: