NSantos написав
We solved it, by adding a slight/minimal change to the foot position (0.00001 or something in the animation that caused the issue), and now have to make sure that for all animations the feet move (even if it's not perceptible).
You don't need to move the bone, you just need to key it (in the first frame). Just be sure to have Animation cleanup
disabled upon exporting your skeleton, otherwise your keys identical to the setup pose would be removed again.
NSantos написавIs this intended? Or am I missing something here?
It's more of an implicit logical side-effect than intended behaviour. The SkeletonUtilityGroundConstraint
limits the vertical location to ground height, by moving it up when below that height. Now when nothing (no animation which keys the bone location and no other user-code) updates the bone location, SkeletonUtilityGroundConstraint
does also nothing to move the location down. There is no simple moving-down logic present because the component can't easily distinguish whether the animation just was not moving the bone this frame (and wants to keep it at this height deliberately), or if no animation was affecting the bone location at all.
This could be worked around by setting the bone location to the setup pose each frame, so when no animation is applied afterwards, it gets the setup pose bone location every frame. You could create your own subclass of SkeletonUtilityGroundConstraint
with just this Update
method added:
void Update () {
bone.bone.X = bone.bone.Data.X;
bone.bone.Y = bone.bone.Data.Y;
}
Alternatively you coudl also register a similar method to SkeletonAnimation.UpdateLocal
to be sure the update order does not depend on the component names.