mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Add vernier capability for virtual ride
This commit is contained in:
parent
314921c7da
commit
5bc05ea3b0
@ -97,6 +97,7 @@ class Interval(DirectObject):
|
||||
self.startT = globalClock.getFrameTime()
|
||||
assert(scale > 0.0)
|
||||
self.scale = scale
|
||||
self.vernier = 0.0
|
||||
self.firstTime = 1
|
||||
if (duration == 0.0):
|
||||
# If no play duration specified, use duration of Interval
|
||||
@ -134,7 +135,7 @@ class Interval(DirectObject):
|
||||
""" __playTask(task)
|
||||
"""
|
||||
t = globalClock.getFrameTime()
|
||||
te = self.offset + ((t - self.startT) * self.scale)
|
||||
te = self.offset + ((t - self.startT) * self.scale + self.vernier)
|
||||
if (te < self.endTime):
|
||||
if (self.firstTime):
|
||||
# If first call, init intervals
|
||||
|
Loading…
x
Reference in New Issue
Block a user