diff --git a/draw.cpp b/draw.cpp index 19c7a85..f81b128 100644 --- a/draw.cpp +++ b/draw.cpp @@ -294,9 +294,9 @@ void GraphicsWindow::SpaceNavigatorMoved(double tx, double ty, double tz, // Apply the transformation to an imported part. Gain down the Z // axis, since it's hard to see what you're doing on that one since // it's normal to the screen. - Vector t = projRight.ScaledBy(tx).Plus( - projUp .ScaledBy(ty).Plus( - out .ScaledBy(0.1*tz))); + Vector t = projRight.ScaledBy(tx/scale).Plus( + projUp .ScaledBy(ty/scale).Plus( + out .ScaledBy(0.1*tz/scale))); Quaternion q = Quaternion::From(aa, aam); // If we go five seconds without SpaceNavigator input, or if we've @@ -320,9 +320,9 @@ void GraphicsWindow::SpaceNavigatorMoved(double tx, double ty, double tz, // x and y components are translation; but z component is scale, // not translation, or else it would do nothing in a parallel // projection - offset = offset.Plus(projRight.ScaledBy(tx)); - offset = offset.Plus(projUp.ScaledBy(ty)); - scale *= exp(0.01*tz); + offset = offset.Plus(projRight.ScaledBy(tx/scale)); + offset = offset.Plus(projUp.ScaledBy(ty/scale)); + scale *= exp(0.001*tz); if(aam != 0.0) { projRight = projRight.RotatedAbout(aa, -aam); diff --git a/win32/w32main.cpp b/win32/w32main.cpp index ea161a4..30de427 100644 --- a/win32/w32main.cpp +++ b/win32/w32main.cpp @@ -1064,9 +1064,9 @@ static BOOL ProcessSpaceNavigatorMsg(MSG *msg) { if(sse.type == SI_MOTION_EVENT) { // The Z axis translation and rotation are both // backwards in the default mapping. - double tx = sse.u.spwData.mData[SI_TX]*0.1, - ty = sse.u.spwData.mData[SI_TY]*0.1, - tz = -sse.u.spwData.mData[SI_TZ]*0.1, + double tx = sse.u.spwData.mData[SI_TX]*1.0, + ty = sse.u.spwData.mData[SI_TY]*1.0, + tz = -sse.u.spwData.mData[SI_TZ]*1.0, rx = sse.u.spwData.mData[SI_RX]*0.001, ry = sse.u.spwData.mData[SI_RY]*0.001, rz = -sse.u.spwData.mData[SI_RZ]*0.001;