Fix sampling Curves with keyframes that have negative time value
This commit is contained in:
@@ -558,7 +558,7 @@ namespace FlaxEngine
|
||||
return;
|
||||
}
|
||||
|
||||
float start = 0;
|
||||
float start = Mathf.Min(Keyframes.First().Time, 0.0f);
|
||||
float end = Keyframes.Last().Time;
|
||||
WrapTime(ref time, start, end, loop);
|
||||
|
||||
@@ -589,7 +589,7 @@ namespace FlaxEngine
|
||||
return;
|
||||
}
|
||||
|
||||
float start = 0;
|
||||
float start = Mathf.Min(Keyframes.First().Time, 0.0f);
|
||||
float end = Keyframes.Last().Time;
|
||||
WrapTime(ref time, start, end, loop);
|
||||
|
||||
@@ -841,7 +841,7 @@ namespace FlaxEngine
|
||||
return;
|
||||
}
|
||||
|
||||
float start = 0;
|
||||
float start = Mathf.Min(Keyframes.First().Time, 0.0f);
|
||||
float end = Keyframes.Last().Time;
|
||||
WrapTime(ref time, start, end, loop);
|
||||
|
||||
@@ -877,7 +877,7 @@ namespace FlaxEngine
|
||||
return;
|
||||
}
|
||||
|
||||
float start = 0;
|
||||
float start = Mathf.Min(Keyframes.First().Time, 0.0f);
|
||||
float end = Keyframes.Last().Time;
|
||||
WrapTime(ref time, start, end, loop);
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
const float start = 0;
|
||||
const float start = Math::Min(data[0].Time, 0.0f);
|
||||
const float end = data[count - 1].Time;
|
||||
AnimationUtils::WrapTime(time, start, end, loop);
|
||||
|
||||
@@ -392,7 +392,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
const float start = 0;
|
||||
const float start = Math::Min(data[0].Time, 0.0f);
|
||||
const float end = data[count - 1].Time;
|
||||
AnimationUtils::WrapTime(time, start, end, loop);
|
||||
|
||||
@@ -434,7 +434,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
const float start = 0;
|
||||
const float start = Math::Min(data[0].Time, 0.0f);
|
||||
const float end = data[count - 1].Time;
|
||||
AnimationUtils::WrapTime(time, start, end, loop);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user