Hi, I am attempting to create a sequence that can be paused at any time during the sequence. The sequence is set up with this function, which is called when a certain contact is detected:
def doGrind():
self.grindseq = Sequence()
for i in range(n, len(self.points)):
par = Parallel(LerpPosInterval(node, t, self.pointPos[i]),
LerpPosInterval(base.camera, t, self.pointPos[i]),
LerpHprInterval(model, t, self.pointHpr[i]))
self.grindseq.append(par)
I attempt to end the sequence with this function:
def exitGrind(self): if self.grindseq.isPlaying(): self.grindseq.pause() print('exit grind')
This does not work. However, when I place self.grindseq = Sequence()
into the __init__
of my program, I get the desired effect, but there is a delay before the sequence begins as well as this error :
:interval(warning): CLerpNodePathInterval::priv_initialize() called for LerpPosInterval-2 in state >started.
Any help is greatly appreciated!