Foot IK for stairs climbing
Hello guys hope everybody is doing fine and keeping safe.
I've been working on a foot IK system following a YouTube tutorial
But being really new to IK in Unity I'm having problem implementing it with my player. No problem with code or anything i fully understood what it's doing.
Context :
The problem I'm facing is that I'm trying to implement stairs and I want my player to climb the stairs with the right foot placement.
The way I'm doing it is I'm creating two duplicate stairs one child of the other, and the parent will be just a ramp that the rigidbody can climb easily, whilst the child is actually a convex collider and is in the layer "Walkable" which means that this is the one the player should place its feet into.
The Problem :
Now what's happening is that my feet are not long enough to touch the stairs (Capsule collider not allowing them to) so the player just stays floating in the air.
and if I rise the capsule collider of the player well then obviously the standing pose will become totally different since his legs will be bent, and that doesn't look good.
What are your suggestion about how I should implement this, what am I missing here?
Thank you all for reading this and thanks for your help :D
Attachments :
Foot IK code : Pastebin Link
Figure 1 : Player floating since the collider doesn't allow the legs to reach the ground
Figure 2 : Legs bent due to attempting to rise the collider even more. Obviously not a good idea...
Your answer
![](https://koobas.hobune.stream/wayback/20220613030430im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
IK positioning itself too low. 1 Answer
Inverse kinematics with pixel art animation? 0 Answers
Inverse Kinematics walk help. (Procedural Animation) 2 Answers
Motor Bike Swing Arm / one IK for one bone 1 Answer
Help with Ik Fit 0 Answers