mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-02 14:38:50 +00:00
Fix camera interpolation being wrong
This commit is contained in:
1 parent
74c4c3076b
commit
47f7b5ae48
2 files changed
+3
-4
No files matched your search
+3
-3
@@ -15,9 +15,9 @@ public record KeyframeChangeCameraPosition(Vector3d position, double yaw, double
|
|||||||
KeyframeChangeCameraPosition other = (KeyframeChangeCameraPosition) to;
|
KeyframeChangeCameraPosition other = (KeyframeChangeCameraPosition) to;
|
||||||
return new KeyframeChangeCameraPosition(
|
return new KeyframeChangeCameraPosition(
|
||||||
this.position.lerp(other.position, amount, new Vector3d()),
|
this.position.lerp(other.position, amount, new Vector3d()),
|
||||||
Interpolation.linear(this.yaw, other.yaw, amount),
|
Interpolation.linearAngle(this.yaw, other.yaw, amount),
|
||||||
Interpolation.linear(this.pitch, other.pitch, amount),
|
Interpolation.linearAngle(this.pitch, other.pitch, amount),
|
||||||
Interpolation.linear(this.roll, other.roll, amount)
|
Interpolation.linearAngle(this.roll, other.roll, amount)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -167,7 +167,6 @@ public class KeyframeTrack {
|
|||||||
rightChange = hermiteChange;
|
rightChange = hermiteChange;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// todo: hermite
|
|
||||||
if (leftChange == null || rightChange == null) {
|
if (leftChange == null || rightChange == null) {
|
||||||
double adjustedAmount = SidedInterpolationType.interpolate(leftInterpolation, rightInterpolation, amount);
|
double adjustedAmount = SidedInterpolationType.interpolate(leftInterpolation, rightInterpolation, amount);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user