From 199ef1e26d47302b1e7e93f831fc6326164c64cc Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Mon, 9 Feb 2026 12:26:56 +0100 Subject: [PATCH] EgtGraphics : - utilizzo di GetPixelZ anche per Pan della camera. --- SceneCamera.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SceneCamera.cpp b/SceneCamera.cpp index a94662a..87c784e 100644 --- a/SceneCamera.cpp +++ b/SceneCamera.cpp @@ -319,12 +319,15 @@ bool Scene::PanCamera( const Point3d& ptWinOld, const Point3d& ptWinNew) { // porto i due punti in coordinate mondo - double dZCenter = GetProjectedCenter().z ; - Point3d ptViewOld( ptWinOld.x, ptWinOld.y, dZCenter) ; + double dOldZCenter ; + GetPixelZ( ptWinOld, dOldZCenter) ; + Point3d ptViewOld( ptWinOld.x, ptWinOld.y, dOldZCenter) ; Point3d ptWorldOld ; if ( ! UnProject( ptViewOld, ptWorldOld)) return false ; - Point3d ptViewNew( ptWinNew.x, ptWinNew.y, dZCenter) ; + double dNewZCenter ; + GetPixelZ( ptWinNew, dNewZCenter) ; + Point3d ptViewNew( ptWinNew.x, ptWinNew.y, dNewZCenter) ; Point3d ptWorldNew ; if ( ! UnProject( ptViewNew, ptWorldNew)) return false ;