diff --git a/src/graphics/engine/camera.cpp b/src/graphics/engine/camera.cpp index 44626130..8ce981b4 100644 --- a/src/graphics/engine/camera.cpp +++ b/src/graphics/engine/camera.cpp @@ -88,7 +88,6 @@ CCamera::CCamera() m_smooth = CAM_SMOOTH_NORM; m_cameraObj = nullptr; - m_eyeDistance = 10.0f; m_initDelay = 0.0f; m_actualEye = Math::Vector(0.0f, 0.0f, 0.0f); @@ -223,7 +222,6 @@ void CCamera::Init(Math::Vector eye, Math::Vector lookat, float delay) m_directionH = Math::RotateAngle(eye.x - lookat.x, eye.z - lookat.z) + Math::PI / 2.0f; m_directionV = -Math::RotateAngle(Math::DistanceProjected(eye, lookat), eye.y - lookat.y); - m_eyeDistance = 10.0f; m_heightLookat = 10.0f; m_backDist = 30.0f; m_backMin = 10.0f; @@ -1528,7 +1526,7 @@ void CCamera::SetScriptLookat(Math::Vector lookat) void CCamera::SetViewParams(const Math::Vector &eye, const Math::Vector &lookat, const Math::Vector &up) { - m_engine->SetViewParams(eye, lookat, up, m_eyeDistance); + m_engine->SetViewParams(eye, lookat, up); bool under = (eye.y < m_water->GetLevel()); // Is it underwater? if (m_type == CAM_TYPE_INFO) diff --git a/src/graphics/engine/camera.h b/src/graphics/engine/camera.h index ff4d62e7..5f995665 100644 --- a/src/graphics/engine/camera.h +++ b/src/graphics/engine/camera.h @@ -282,8 +282,6 @@ protected: //! Object linked to the camera CObject* m_cameraObj; - //! Distance between the eyes - float m_eyeDistance; //! Time of initial centering float m_initDelay; @@ -293,11 +291,11 @@ protected: Math::Vector m_actualLookat; //! Final eye Math::Vector m_finalEye; - //! Final aim + //! Final lookat Math::Vector m_finalLookat; - //! Normal eye + //! Eye position at the moment of entering CAM_TYPE_INFO/CAM_TYPE_VISIT Math::Vector m_normEye; - //! Normal aim + //! Lookat position at the moment of entering CAM_TYPE_INFO/CAM_TYPE_VISIT Math::Vector m_normLookat; float m_focus; diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index d8666731..8eb92754 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -2184,8 +2184,7 @@ void CEngine::SetMaterial(const Material& mat) m_device->SetMaterial(mat); } -void CEngine::SetViewParams(const Math::Vector& eyePt, const Math::Vector& lookatPt, - const Math::Vector& upVec, float eyeDistance) +void CEngine::SetViewParams(const Math::Vector &eyePt, const Math::Vector &lookatPt, const Math::Vector &upVec) { m_eyePt = eyePt; m_lookatPt = lookatPt; diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index 8fb195a2..e60e6e37 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -901,8 +901,7 @@ public: void SetMaterial(const Material& mat); //! Specifies the location and direction of view - void SetViewParams(const Math::Vector& eyePt, const Math::Vector& lookatPt, - const Math::Vector& upVec, float eyeDistance); + void SetViewParams(const Math::Vector &eyePt, const Math::Vector &lookatPt, const Math::Vector &upVec); //! Loads texture, creating it if not already present Texture LoadTexture(const std::string& name);