|
|
|
|
Reply From: |
genete |
You probably animated the position of the whole body. It only needs one (or more) new keyframe in the middle to keep the feet on floor.
Thank you for the answer!
All of the sprites are in a KinematicBody2D node, but I don’t animate this body, only its child sprites (body parts).
I have created a simplified project, that contains only one leg.
The node hierarchy is similar to this: cutout animation tutorial
The AnimationPlayer calculates wrong values between the keyframes, or I misunderstood something about how it works.
Here you can see, that I don’t change the KinematicBody2D’s properties:
I can add new keyframes (as you said), and it seems good in the editor, but the problem still exists between these new keyframes when I play the project.
I hope, I don’t need to put keyframes to every 1/60 seconds
bruteforce | 2016-12-18 11:19
There is nothing wrong on Godot interpolations. The problem is that you animate both rotation and position of the leg at the same time. At the start and end keyframes, the foot position is on the correct place but in the middle, the combination of the rotation and the position of the kinematic chain (leg/shin/foot) places the foot on the wrong position.
Try to place two keyframes at 0.1 and 0.2 seconds to fix the foot place and live with that.
Alternatively create an inverse hierarchy where the foot is the root of the kinematic chain and so it wouldn’t move at all for that kind of movement.
genete | 2016-12-18 12:18
You’re right, thanks for the explanation!
The new keyframes at 0.1 and 0.2 are not perfect, the same problem appears at 0.05, 0.15… etc., and the foot “bounces” when I play the animation/project.
The inverse hierarchy is a good idea, but my other animations (eg. “run”) needs the original structure.
I have to find another way.
I’ll be back soon
bruteforce | 2016-12-19 09:15