Closed techy-robot closed 1 week ago
If you can create a fix for this, feel free to let me know so that i can implement the fix!
I am having issues using your godot files. It can't find any of the .blend files and it says the scenes are corrupt! Do you have any guidance?
That will happen when you don't set up the blender executable path!
Okay, I can open your project now. I will start work on this feature, and create a pull request when done.
Currently, it looks like the player is gliding over the ground and the feet have no real "traction." It's doing a moonwalk with a normal walking animation. I am proposing a way to fix this issue, using Godot script.
If you can track the location of the heals and toes (using some sort of bone or tracker point) with reference to the center of the body, then you apply that relative movement to the movement of the whole character. You don't have to change the animation at all, though we may have to add those tracking points. Real life walking is not smooth, it fluctuates a little in speed. If we tracked the heel of the foot while it is on the ground, derive the velocity in that game frame, and apply that to the movement of the character, the animation will sync up almost perfectly. This can also be done during the run cycle, or blending between walk and stop.
Now, since it is a walk cycle with the feet picked up and placed down, we will have to switch which point is in control of the body movement every so often. We could do this by telling when the heel or toe of the foot is on the ground. Either a proximity of the tracker point to the ground, or distance from the center of the player. In the instance where both left, and right feet are on the ground, or both the heel and the toe, we would have to pick a default. It should not matter which, as long as the point is on the ground. Let's just say the heel is the default, and the foot that was on the ground last is the default.