Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-02-18 16:51:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-18 16:55:58 +0400
commitdcdb4eaf9cce1f3ff84bbe221ebafd20c2371541 (patch)
tree794f2700130434d78435166532f0b813e0a0b3f7 /source/blender/editors/space_view3d/view3d_walk.c
parent13553876ba3e18f49c2199d9c21f53ff2d8b2e41 (diff)
NDOF: Fix for fly/walk mode ignoring axis invert options
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_walk.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 426a9a69f07..b49e26241b8 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -1239,19 +1239,21 @@ static int walkApply_ndof(bContext *C, WalkInfo *walk)
if (do_translate) {
float speed = 10.0f; /* blender units per second */
- float trans[3];
+ float trans[3], trans_orig_y;
/* ^^ this is ok for default cube scene, but should scale with.. something */
if (walk->is_slow)
speed *= 0.2f;
- mul_v3_v3fl(trans, ndof->tvec, speed * dt);
+ WM_event_ndof_pan_get(ndof, trans, false);
+ mul_v3_fl(trans, speed * dt);
+ trans_orig_y = trans[1];
/* transform motion from view to world coordinates */
mul_qt_v3(view_inv, trans);
if (flag & NDOF_FLY_HELICOPTER) {
/* replace world z component with device y (yes it makes sense) */
- trans[2] = speed * dt * ndof->tvec[1];
+ trans[2] = trans_orig_y;
}
if (rv3d->persp == RV3D_CAMOB) {
@@ -1277,7 +1279,7 @@ static int walkApply_ndof(bContext *C, WalkInfo *walk)
float rotation[4];
float axis[3];
- float angle = turn_sensitivity * ndof_to_axis_angle(ndof, axis);
+ float angle = turn_sensitivity * WM_event_ndof_to_axis_angle(ndof, axis);
if (fabsf(angle) > 0.0001f) {
do_rotate = true;