def enterOpening(self, ts): bldgActor = self.getBuildingActor() rightDoor = bldgActor.controlJoint(None, 'modelRoot', 'def_right_door') if rightDoor.isEmpty(): self.notify.warning('enterOpening(): did not find rightDoor') return otherNP = self.getDoorNodePath() trackName = 'doorOpen-%d' % self.doId if self.rightSwing: h = 100 else: h = -100 self.finishDoorTrack() self.doorTrack = Parallel(SoundInterval(self.openSfx, node=rightDoor), Sequence( HprInterval(rightDoor, VBase3(0, 0, 0)), Wait(0.4), LerpHprInterval(nodePath=rightDoor, duration=0.6, hpr=VBase3(h, 0, 0), startHpr=VBase3(0, 0, 0), blendType='easeInOut')), name=trackName) self.doorTrack.start(ts) return
def enterOpening(self, ts): #if( __debug__ ): # import pdb # pdb.set_trace() assert(self.debugPrint("enterOpening()")) # Right door: bldgActor = self.getBuildingActor() rightDoor = bldgActor.controlJoint(None, "modelRoot", "def_right_door") if (rightDoor.isEmpty()): self.notify.warning("enterOpening(): did not find rightDoor") return # Open the door: otherNP=self.getDoorNodePath() trackName = "doorOpen-%d" % (self.doId) if self.rightSwing: h = 100 else: h = -100 # Stop animation: self.finishDoorTrack() self.doorTrack=Parallel( SoundInterval(self.openSfx, node=rightDoor), Sequence( HprInterval( rightDoor, VBase3(0, 0, 0), #other=otherNP, ), Wait(0.4), #Func(rightDoor.show), #Func(doorFrameHoleRight.show), LerpHprInterval( nodePath=rightDoor, duration=0.6, hpr=VBase3(h, 0, 0), startHpr=VBase3(0, 0, 0), #other=otherNP, blendType="easeInOut")), name = trackName) # Start the tracks: self.doorTrack.start(ts)