diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-17 15:17:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-17 15:17:31 +0400 |
commit | d39ffd72174c28a66c3a8d97054d67cc372f088b (patch) | |
tree | c7ee115fe8820ddb7e8b2d916ef5da2e1780e596 /source/blender/editors/space_view3d/view3d_edit.c | |
parent | d8d7d8e1e3c18bee520f308eead4cf967fbd7b87 (diff) |
NDOF: remove bias for translation
Was noticeable (and annoying) that different axis had different speed,
if we want to have axis bias better do as a user preference.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 8a11b336fd5..757784cf32a 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1178,12 +1178,6 @@ static void view3d_ndof_pan_zoom(const struct wmNDOFMotionData *ndof, ScrArea *s { RegionView3D *rv3d = ar->regiondata; const float dt = ndof->dt; - - /* tune these until everything feels right */ - const float forward_sensitivity = 1.f; - const float vertical_sensitivity = 0.4f; - const float lateral_sensitivity = 0.6f; - float view_inv[4]; float pan_vec[3]; @@ -1191,9 +1185,9 @@ static void view3d_ndof_pan_zoom(const struct wmNDOFMotionData *ndof, ScrArea *s return; } - pan_vec[0] = lateral_sensitivity * ndof->tvec[0] * ((U.ndof_flag & NDOF_PANX_INVERT_AXIS) ? -1.0f : 1.0f); - pan_vec[1] = vertical_sensitivity * ndof->tvec[1] * ((U.ndof_flag & NDOF_PANZ_INVERT_AXIS) ? -1.0f : 1.0f); - pan_vec[2] = forward_sensitivity * ndof->tvec[2] * ((U.ndof_flag & NDOF_PANY_INVERT_AXIS) ? -1.0f : 1.0f); + pan_vec[0] = ndof->tvec[0] * ((U.ndof_flag & NDOF_PANX_INVERT_AXIS) ? -1.0f : 1.0f); + pan_vec[1] = ndof->tvec[1] * ((U.ndof_flag & NDOF_PANZ_INVERT_AXIS) ? -1.0f : 1.0f); + pan_vec[2] = ndof->tvec[2] * ((U.ndof_flag & NDOF_PANY_INVERT_AXIS) ? -1.0f : 1.0f); if (has_zoom) { /* zoom with Z */ |