--- ray/src/rt/rv3.c 1989/02/02 10:41:39 1.1 +++ ray/src/rt/rv3.c 1989/05/24 13:55:54 1.3 @@ -272,16 +272,19 @@ FVECT vc; VCOPY(nv.vup, ourview.vup); nv.hresolu = ourview.hresolu; nv.vresolu = ourview.vresolu; spinvector(nv.vdir, ourview.vdir, ourview.vup, angle*(PI/180.)); - d = sqrt(dist2(ourview.vp, vc)) / mag; - for (i = 0; i < 3; i++) - nv.vp[i] = vc[i] - d*nv.vdir[i]; if ((nv.type = ourview.type) == VT_PAR) { nv.horiz = ourview.horiz / mag; nv.vert = ourview.vert / mag; + d = 0.0; /* don't move closer */ + for (i = 0; i < 3; i++) + d += (vc[i] - ourview.vp[i])*ourview.vdir[i]; } else { nv.horiz = ourview.horiz; nv.vert = ourview.vert; + d = sqrt(dist2(ourview.vp, vc)) / mag; } + for (i = 0; i < 3; i++) + nv.vp[i] = vc[i] - d*nv.vdir[i]; newview(&nv); }