From 0b8d74ab6161b4654f2f54e6b5dd940c638b74e4 Mon Sep 17 00:00:00 2001 From: Micheus Date: Sun, 3 Nov 2013 05:55:15 -0200 Subject: [PATCH] NOTE: It was fixed an issue related to setting the camera position by dialog. The Y value was not moving the camera top/dowm when the X and Z values were zero. Thanks to ekolis for report it. [Micheus] --- plugins_src/commands/wpc_numeric_camera.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins_src/commands/wpc_numeric_camera.erl b/plugins_src/commands/wpc_numeric_camera.erl index a640cad19..b69f5e195 100644 --- a/plugins_src/commands/wpc_numeric_camera.erl +++ b/plugins_src/commands/wpc_numeric_camera.erl @@ -88,7 +88,10 @@ camera_position({OldView,[CamX,CamY,CamZ, FX,FY,FZ]}, St) -> 0.0 -> 1.0; _ -> -CamX/abs(CamX) end, - Y2 = e3d_vec:sub({CamX,0.0,CamZ}, {FX,0.0,FZ}), + Y2 = case {CamX,CamZ} of + {0.0,0.0} -> {0.0,0.0,1.0}; + _ -> e3d_vec:sub({CamX,0.0,CamZ}, {FX,0.0,FZ}) + end, Az = AzF * e3d_vec:degrees(Y2, {0.0,0.0,1.0}), ElF = case CamY of 0.0 -> 1.0;