Fix for Character IK feet position resetting themselves on a slope

Glitch

New member
A problem I found in the demo scene and also on my own characters is that if you're using the Character IK component the feet tend to reset their position back to their animation default flat state when on a slope.

I'm still relatively new to scripting in Unity so I'm sure there is a better way to fix this but just in case I'll post my solution here.

I was able to fix the issue in the Character IK script file at line 742. I duplicated the logic from the existing condition that is checking for intersection with the ground and adjusted the logic to check for A: Is the character on an incline, and B: Is the character stationary. This then forces the feet positioning accordingly.

It's not perfect and I'm sure someone with more unity scripting experience can do this more cleanly.

@Justin I want to flag this as a potential bug fix for a future update.
 

Attachments

  • characterik-fix.png
    characterik-fix.png
    88.4 KB · Views: 3
Back
Top