Need Help Making Collision with Ground Work Correctly

Basically you have to think of the final tip of the ray as if it were the center of the character’s feet but just slightly below them.
Normally, to work, the ray must come out of the transform, which is why I tell you very short. Try different mini-lengths, we’ll have to see how CGE handles the raycast.

Once you’re able to change the animation according to the character’s position, you’ll probably need to modify the logic of your code a bit.
I’m not sure how PlayAnimation works, but in your code it seems like you call it repeatedly. Could it be that you lose a few frames this way? It’s just a doubt to check, it could be that CGE completes it anyway before starting over from the first frame.