I added inverse kinematics to the hands! This was pretty difficult to set up as I don’t have a visual viewport to see the bones of my rig in so I had to go in Blender and see all the names of the arm bones and propogate the IK solver points across all of them.
There’s also an IK solver class now which takes a base and a target. I also added slerping to the hand target to make it blend smoothly.
There are two variables, leftGuard and rightGuard which control whether a hand is affected by IK or not. And there’s also an IK weight factor which controls the transition between animation and IK to make it go between the two smoothly.
The left or right guard are disabled whenever you punch to make the arm actually go forward and use the regular animation.
I also added a stamina and health bar. They use a shader which fills up the texture with a color based on a number which is the health or stamina.
The health does nothing right now but stamina is drained by punching and regenerates on a rate that depends on what state you are in.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.