mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
workaround for zero-length interval bug?
This commit is contained in:
parent
bd7f313b91
commit
e4dc6de96f
@ -64,7 +64,10 @@ class ActorInterval(Interval.Interval):
|
|||||||
|
|
||||||
def calcFrame(self, t):
|
def calcFrame(self, t):
|
||||||
segmentLength = abs(self.finishTime - self.startTime)
|
segmentLength = abs(self.finishTime - self.startTime)
|
||||||
offset = t % segmentLength
|
if segmentLength == 0:
|
||||||
|
offset = 0
|
||||||
|
else:
|
||||||
|
offset = t % segmentLength
|
||||||
# Handle boundary case where we want to set the final frame
|
# Handle boundary case where we want to set the final frame
|
||||||
if (t == self.getDuration() and offset < 0.0001):
|
if (t == self.getDuration() and offset < 0.0001):
|
||||||
offset = segmentLength
|
offset = segmentLength
|
||||||
|
Loading…
x
Reference in New Issue
Block a user