fix: Update Qt API usage for QWheelEvent and QMatrix4x4
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -51,7 +51,7 @@ void Camera::wheelEvent(QWheelEvent* event, const QVector3D& worldPos)
|
||||
QMatrix4x4 rotation;
|
||||
rotation.rotate(m_xRot / 16.0f, 1, 0, 0);
|
||||
rotation.rotate(m_yRot / 16.0f, 0, 1, 0);
|
||||
QVector3D p_camera = rotation * worldPos;
|
||||
QVector3D p_camera = rotation.map(worldPos);
|
||||
|
||||
if (std::abs(p_camera.z() + oldZoom) < 1e-6) {
|
||||
setZoom(newZoom);
|
||||
|
||||
Reference in New Issue
Block a user