Finally, I have successfully built the functionality to get the character to detect and touch a wall on his left with his offhand using a raycast and IK! There is still a minor problem, since the hand doesn't make direct contact with the wall. Still, this lays the foundation for all other wall-touching actions on my task list such as creating friction while falling and ledge grabbing. However, I don't think I will get to ledge grabbing, that'll be a bit tricky, but friction while falling is worth a try! This may also pave the way for me to troubleshoot foot planting, since they both use raycasts and animation curves to blend between IK and an animation.
Above, we can see the raycast detecting the wall and causing the animation to play. On the right, we can see the original animation in the inspector, and a curve above it. This curve is what sets the weight for blending between Unity IK and the original animation.
No comments:
Post a Comment