diff options
author | Mike Erwin <significant.bit@gmail.com> | 2011-07-19 08:12:49 +0400 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2011-07-19 08:12:49 +0400 |
commit | 7f74abeaca38d0c1634a8d0532bb38877a1f730e (patch) | |
tree | 408c1c5cda3cc134e0f185085b437638af9573ac /source/blender/editors/space_view3d | |
parent | 5f47123fded84fed85d6a0713f814c99f68c1ce7 (diff) |
translated ndof menu from C to Python, enabled helicopter fly mode
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_fly.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index ec17aa9586f..8269d0e7cd3 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -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); |