mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -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()
|
self.startT = globalClock.getFrameTime()
|
||||||
assert(scale > 0.0)
|
assert(scale > 0.0)
|
||||||
self.scale = scale
|
self.scale = scale
|
||||||
|
self.vernier = 0.0
|
||||||
self.firstTime = 1
|
self.firstTime = 1
|
||||||
if (duration == 0.0):
|
if (duration == 0.0):
|
||||||
# If no play duration specified, use duration of Interval
|
# If no play duration specified, use duration of Interval
|
||||||
@ -134,7 +135,7 @@ class Interval(DirectObject):
|
|||||||
""" __playTask(task)
|
""" __playTask(task)
|
||||||
"""
|
"""
|
||||||
t = globalClock.getFrameTime()
|
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 (te < self.endTime):
|
||||||
if (self.firstTime):
|
if (self.firstTime):
|
||||||
# If first call, init intervals
|
# If first call, init intervals
|
||||||
|
Loading…
x
Reference in New Issue
Block a user