Пример #1
0
 def Update(self):
     BaseSpaceCamera.Update(self)
     if self.model and self.model.translationCurve:
         atPos = self.model.translationCurve.value
         diff = geo2.Vec3Subtract(atPos, self._atPosition)
         self.atPosition = atPos
         self.eyePosition = geo2.Vec3Add(self.eyePosition, diff)
Пример #2
0
 def Update(self):
     BaseSpaceCamera.Update(self)
     if IsDynamicCameraMovementEnabled():
         self.SetFovTarget(self.GetDynamicFov())
     ball = GetBall(self.ego)
     if ball:
         self.SetAtPosition(GetBallPosition(ball))
Пример #3
0
 def Update(self):
     self._UpdateAnchorPosition()
     BaseSpaceCamera.Update(self)
     if not self.lookAtBall or not self.ego:
         return
     zoomProp = self.GetZoomProportion()
     self._UpdateAtOffset()
     self._UpdateEyeOffset()
     newAtPos = self.GetTrackPosition(self.lookAtBall)
     atDiff = geo2.Vec3Subtract(newAtPos, self._atPosition)
     self.SetAtPosition(newAtPos)
     if self.IsChasing():
         self.SetEyePosition(
             self.trackLerper.GetValue(self._eyePosition,
                                       self.GetChaseEyePosition()))
     elif self.IsTracking():
         self.SetEyePosition(
             self.trackLerper.GetValue(self._eyePosition,
                                       self.GetTrackingEyePosition()))
     else:
         prop = self._GetEyePosDriftProporition()
         eyeOffset = geo2.Vec3Scale(atDiff, prop)
         self.SetEyePosition(geo2.Vec3Add(self._eyePosition, eyeOffset))
     if not self.IsInTransit():
         if self.GetItemID() == self.ego or self.IsTracking(
         ) or self.IsChasing():
             self.SetZoom(zoomProp)
         self.EnforceMinZoom()
     if not self.isManualFovEnabled and IsDynamicCameraMovementEnabled():
         self.SetFovTarget(self.GetDynamicFov())
Пример #4
0
 def Update(self):
     BaseSpaceCamera.Update(self)
     if not session.solarsystemid:
         return
     if not self.trackBall:
         self.UpdateTrackBall()
     if self.trackBall and getattr(
             self.trackBall, 'model', None) and hasattr(
                 self.trackBall.model.rotationCurve, 'value'):
         self.UpdateUpDirection()
         self.UpdateAtEyePositions()
         self.UpdateInSceneContainer()
     if self.trackBall and self.trackBall.id != self.ego:
         uthread.new(
             sm.GetService('sceneManager').SetPrimaryCamera,
             evecamera.CAM_SHIPORBIT)
Пример #5
0
 def Update(self):
     BaseSpaceCamera.Update(self)
     if not session.solarsystemid:
         return
     if self.IsActiveOrTrackingShipWarping() and not self.IsAttached():
         self.LookAt(self.ego)
     if self.positionAnimator.GetItemID():
         self.positionAnimator.Update()
         if self.IsTracking():
             atPos = self.GetTrackingAtPosition()
         else:
             atPos = self.positionAnimator.GetAtPosition()
         self.SetAtPosition(atPos)
         self.SetEyePosition(self.positionAnimator.GetEyePosition())
     if self.IsAttached():
         self._EnforceMaximumDistanceAttached()
     else:
         self._EnforceMaximumDistanceDetached()