top of page
Writer's pictureDaniel Henshaw

[22/03/2022] Inverse Kinematic Feet System

Player Controller Script:

I used Unity's built in IK system in order to create this feet system. Using a raycast I found the distance and angle of the object directly underneath the players foot. I then using IK moved the players foot to touch the object and angle it depending on the angle of what the player is standing on.




Evaluation:

I decided to create an IK feet system. This meant that my players feet would move depending on what it is stood on top of. I did this because I wanted to include a small amount of detail to the player. It also allowed me to gain a basic knowledge of how IK works. The reason behind wanting to gain some knowledge behind IK was due to the fact I would be using it in the future on my weapon system to control the arms of the player.


While coding this system I ran into a small issue with the run animation. While the player was running and their leg was no longer touching the ground the IK system would take over and still run in the background causing the feet to stay planted. I fixed this by using an animation parameter which allowed me to fade between the a value of 0 and 1 for the weight of the foot IK. I then added an animation curve with the weight I wanted the foot to have. 1 being IK activated and 0 being IK disabled.

Animation Curve On Forward Animation (Green = Right Foot | Blue = Left Foot):


Comentários


bottom of page