I want the Legs of my robot to bend upwards to the pole attachments but after a few steps they “ignore” the pole and starts to bend downwards.
What it looks like:
https://i.gyazo.com/d197074c18c2c2b9a3205f6a49e07c93.mp4
The pole attachments are placed 50 units up above the bot:
Script:
local Bot = script.Parent
local leftlegIK = Bot.AnimationController.LeftLeg
local rightlegIK = Bot.AnimationController.RightLeg
leftlegIK.Pole = Bot.Head.LeftLegBendAttachment
rightlegIK.Pole = Bot.Head.RightLegBendAttachment
Structure:
You can use HingeConstraints/BallSocketConstraints to limit the movement of joints when using IK which should prevent the undesired movement. There’s a tutorial for how to do this on the documentation which can be found here: Inverse Kinematics - Adding Constraints. Hope this helps!
I figured I didn’t really want to mess with constraints because they are hard to get a grip on, and also because i thought the pole property was going to work better, am I misunderstanding the purpose of the Pole? Is it not supposed to be used like this?
I’ve never used the Pole property before, and the documentation doesn’t really give any examples of how to use it. Based on what it says though, the algorithm that solves the movement might just be bending the limbs the wrong way. I don’t know how to fix that other than using constraints. Unfortunately, that’s the only solution I can provide. Maybe someone else will stumble across this topic that knows something I don’t.