Skip to content

Commit

Permalink
NOTE: It was fixed an issue related to setting the camera position by…
Browse files Browse the repository at this point in the history
… 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]
  • Loading branch information
Micheus committed Nov 3, 2013
1 parent bb543ef commit 0b8d74a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins_src/commands/wpc_numeric_camera.erl
Expand Up @@ -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;
Expand Down

0 comments on commit 0b8d74a

Please sign in to comment.