translated ndof menu from C to Python, enabled helicopter fly mode
[blender.git] / source / blender / editors / space_view3d / view3d_fly.c
index ec17aa9586f65656b7936e3d38f62a617d300ed8..8269d0e7cd3456a684eaba2453611891323625e3 100644 (file)
@@ -973,6 +973,15 @@ static int flyApply_ndof(bContext *C, FlyInfo *fly)
                // transform motion from view to world coordinates
                mul_qt_v3(view_inv, trans);
 
+               // int fly_mode = TRUE;
+               int fly_mode = U.ndof_flag & NDOF_FLY_HELICOPTER;
+               // could also use RNA to get a simple boolean value
+
+               if (fly_mode)
+                       {
+                       trans[2] = speed * dt * vertical_sensitivity * ndof->ty;
+                       }
+
                // move center of view opposite of hand motion (this is camera mode, not object mode)
                sub_v3_v3(rv3d->ofs, trans);