Skip to content

Commit

Permalink
fix calculated zero
Browse files Browse the repository at this point in the history
  • Loading branch information
iam4722202468 committed Apr 11, 2024
1 parent 69992db commit b5624ea
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ public ComputedFrameProvider(LinkedHashMap<Double, BoneAnimationImpl.PointInterp
@Override
public Point getFrame(int tick) {
var first = transform.get(lowestKey);
if (first == null) return Vec.ZERO;
if (first == null) return switch (type) {
case TRANSLATION, ROTATION -> Vec.ZERO;
case SCALE -> Vec.ONE;
};

double toInterpolate = tick * 50.0 / 1000;
var point = first.p().evaluate(toInterpolate);
Expand Down

0 comments on commit b5624ea

Please sign in to comment.