File tree Expand file tree Collapse file tree
Core/GameEngineDevice/Source/W3DDevice/GameClient Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -429,7 +429,7 @@ Bool W3DView::zoomCameraToDesiredHeight()
429429 if (fabs (adjustZoom) >= 0 .001f )
430430 {
431431 const Real fpsRatio = TheFramePacer->getBaseOverUpdateFpsRatio ();
432- const Real adjustFactor = TheGlobalData->m_cameraAdjustSpeed * fpsRatio;
432+ const Real adjustFactor = std::min ( TheGlobalData->m_cameraAdjustSpeed * fpsRatio, 1 . 0f ) ;
433433 m_zoom += adjustZoom * adjustFactor;
434434 return true ;
435435 }
@@ -441,12 +441,12 @@ Bool W3DView::zoomCameraToDesiredHeight()
441441// This is essential to correctly center the camera above the ground when playing.
442442Bool W3DView::movePivotToGround ()
443443{
444- const Real fpsRatio = TheFramePacer->getBaseOverUpdateFpsRatio ();
445- const Real adjustFactor = TheGlobalData->m_cameraAdjustSpeed * fpsRatio;
446444 const Real groundLevel = m_groundLevel;
447445 const Real groundLevelDiff = m_terrainHeightAtPivot - groundLevel;
448446 if (fabs (groundLevelDiff) > 0 .1f )
449447 {
448+ const Real fpsRatio = TheFramePacer->getBaseOverUpdateFpsRatio ();
449+ const Real adjustFactor = std::min (TheGlobalData->m_cameraAdjustSpeed * fpsRatio, 1 .0f );
450450 // Adjust the ground level. This will change the world height of the camera.
451451 m_groundLevel += groundLevelDiff * adjustFactor;
452452
You can’t perform that action at this time.
0 commit comments