Added getLinearInterpolator() and getCubicInterpolator() methods to KeyframeValue interface to allow for specific Interpolators instead of the Generic Interpolators
Created InterpolationUtils class with a method to fix the Euler Rotation Break problem Create AdvancedPositionSplineInterpolation and AdvancedPositionLinearInterpolation which always use the shortest possible paths between the Euler Rotation values of the Camera's Yaw and Roll Remove Position Keyframe filtering when adding the Keyframe. This is now done by the AdvancedPositionInterpolation classes
This commit is contained in:
@@ -257,23 +257,6 @@ public class ReplayHandler {
|
||||
positionKeyframes.add(keyframe);
|
||||
selectKeyframe(keyframe);
|
||||
|
||||
Float a = null;
|
||||
Float b;
|
||||
|
||||
for(Keyframe<AdvancedPosition> kf : positionKeyframes) {
|
||||
AdvancedPosition pos = kf.getValue();
|
||||
b = (float)pos.getYaw() % 360;
|
||||
if(a != null) {
|
||||
float diff = b-a;
|
||||
if(Math.abs(diff) > 180) {
|
||||
b = a - (360 - diff) % 360;
|
||||
pos.setYaw(b);
|
||||
kf.setValue(pos);
|
||||
}
|
||||
}
|
||||
a = b;
|
||||
}
|
||||
|
||||
fireKeyframesModifyEvent();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user