Skip to content

Commit

Permalink
do not change aspect ration of camera when reest
Browse files Browse the repository at this point in the history
  • Loading branch information
Tucchhaa committed Aug 23, 2024
1 parent d68f289 commit 8aa25be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/modmesh/view/RCameraController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void RCameraInputListener::initKeyboardListeners() const

void CameraController::reset()
{
camera()->lens()->setPerspectiveProjection(45.0f, 16.0f / 9.0f, 0.1f, 1000.0f);
camera()->lens()->setPerspectiveProjection(45.0f, camera()->lens()->aspectRatio(), 0.1f, 1000.0f);

setPosition(m_default_position);
setViewCenter(m_default_view_center);
Expand Down

0 comments on commit 8aa25be

Please sign in to comment.