Fix more camera lerps
This commit is contained in:
parent
3666947d2b
commit
635ea1d3d1
2 changed files with 17 additions and 5 deletions
|
@ -44,6 +44,7 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem):
|
||||||
self.intervalAvatar = None
|
self.intervalAvatar = None
|
||||||
self.phoneInUse = 0
|
self.phoneInUse = 0
|
||||||
self.origToonHpr = None
|
self.origToonHpr = None
|
||||||
|
self.lerpCameraSeq = None
|
||||||
return
|
return
|
||||||
|
|
||||||
def announceGenerate(self):
|
def announceGenerate(self):
|
||||||
|
@ -116,7 +117,10 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem):
|
||||||
def setupCamera(self, mode):
|
def setupCamera(self, mode):
|
||||||
camera.wrtReparentTo(render)
|
camera.wrtReparentTo(render)
|
||||||
if mode == PhoneGlobals.PHONE_MOVIE_PICKUP:
|
if mode == PhoneGlobals.PHONE_MOVIE_PICKUP:
|
||||||
camera.lerpPosHpr(4, -4, base.localAvatar.getHeight() - 0.5, 35, -8, 0, 1, other=base.localAvatar, blendType='easeOut', task=self.uniqueName('lerpCamera'))
|
quat = Quat()
|
||||||
|
quat.setHpr((35, -8, 0))
|
||||||
|
self.lerpCameraSeq = camera.posQuatInterval(1, Point3(4, -4, base.localAvatar.getHeight() - 0.5), quat, other=base.localAvatar, blendType='easeOut', name=self.uniqueName('lerpCamera'))
|
||||||
|
self.lerpCameraSeq.start()
|
||||||
|
|
||||||
def setupCord(self):
|
def setupCord(self):
|
||||||
if self.cord:
|
if self.cord:
|
||||||
|
@ -190,7 +194,9 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem):
|
||||||
def freeAvatar(self):
|
def freeAvatar(self):
|
||||||
if self.hasLocalAvatar:
|
if self.hasLocalAvatar:
|
||||||
base.localAvatar.speed = 0
|
base.localAvatar.speed = 0
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
if self.lerpCameraSeq:
|
||||||
|
self.lerpCameraSeq.finish()
|
||||||
|
self.lerpCameraSeq = None
|
||||||
base.localAvatar.posCamera(0, 0)
|
base.localAvatar.posCamera(0, 0)
|
||||||
if base.cr.playGame.place != None:
|
if base.cr.playGame.place != None:
|
||||||
base.cr.playGame.getPlace().setState('walk')
|
base.cr.playGame.getPlace().setState('walk')
|
||||||
|
|
|
@ -167,6 +167,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
|
||||||
self.physControls.event.addAgainPattern('again%in')
|
self.physControls.event.addAgainPattern('again%in')
|
||||||
self.oldPos = None
|
self.oldPos = None
|
||||||
self.questMap = None
|
self.questMap = None
|
||||||
|
self.lerpFurnitureButton = None
|
||||||
|
|
||||||
def wantLegacyLifter(self):
|
def wantLegacyLifter(self):
|
||||||
return True
|
return True
|
||||||
|
@ -293,7 +294,9 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
|
||||||
self.__piePowerMeter.destroy()
|
self.__piePowerMeter.destroy()
|
||||||
self.__piePowerMeter = None
|
self.__piePowerMeter = None
|
||||||
taskMgr.remove('unlockGardenButtons')
|
taskMgr.remove('unlockGardenButtons')
|
||||||
taskMgr.remove('lerpFurnitureButton')
|
if self.lerpFurnitureButton:
|
||||||
|
self.lerpFurnitureButton.finish()
|
||||||
|
self.lerpFurnitureButton = None
|
||||||
if self.__furnitureGui:
|
if self.__furnitureGui:
|
||||||
self.__furnitureGui.destroy()
|
self.__furnitureGui.destroy()
|
||||||
del self.__furnitureGui
|
del self.__furnitureGui
|
||||||
|
@ -1179,8 +1182,11 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
|
||||||
self.__furnitureGui.setScale(0.06)
|
self.__furnitureGui.setScale(0.06)
|
||||||
elif self.cr.furnitureManager != None:
|
elif self.cr.furnitureManager != None:
|
||||||
self.showFurnitureGui()
|
self.showFurnitureGui()
|
||||||
taskMgr.remove('lerpFurnitureButton')
|
if self.lerpFurnitureButton:
|
||||||
self.__furnitureGui.lerpPosHprScale(pos=Point3(-1.19, 0.0, 0.33), hpr=Vec3(0.0, 0.0, 0.0), scale=Vec3(0.04, 0.04, 0.04), time=1.0, blendType='easeInOut', task='lerpFurnitureButton')
|
self.lerpFurnitureButton.finish()
|
||||||
|
self.lerpFurnitureButton = None
|
||||||
|
self.lerpFurnitureButton = self.__furnitureGui.posHprScaleInterval(pos=Point3(-1.19, 0.0, 0.33), hpr=Vec3(0.0, 0.0, 0.0), scale=Vec3(0.04, 0.04, 0.04), duration=1.0, blendType='easeInOut', name='lerpFurnitureButton')
|
||||||
|
self.lerpFurnitureButton.start()
|
||||||
if hasattr(self, 'inEstate') and self.inEstate:
|
if hasattr(self, 'inEstate') and self.inEstate:
|
||||||
self.loadGardeningGui()
|
self.loadGardeningGui()
|
||||||
self.hideGardeningGui()
|
self.hideGardeningGui()
|
||||||
|
|
Loading…
Reference in a new issue