diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_system.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 258d6bbc025..c1fd903c479 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2329,29 +2329,32 @@ static void attach_ndof_data(wmEvent* event, const GHOST_TEventNDOFMotionData* g const float s = U.ndof_sensitivity; - data->tvec[0]= s * ghost->tx; + data->tx = s * ghost->tx; - data->rvec[0]= s * ghost->rx; - data->rvec[1]= s * ghost->ry; - data->rvec[2]= s * ghost->rz; + data->rx = s * ghost->rx; + data->rx = s * ghost->ry; + data->rx = s * ghost->rz; if (U.ndof_flag & NDOF_ZOOM_UPDOWN) { - // rotate so Y is where Z was (maintain handed-ness) - data->tvec[1]= s * ghost->tz; - data->tvec[2]= s * -ghost->ty; - - // should this affect rotation also? - // initial guess is 'yes', but get user feedback immediately! -#if 0 // after turning this on, my guess becomes 'no' - data->rvec[1]= s * ghost->rz; - data->rvec[2]= s * ghost->ry; + /* rotate so Y is where Z was */ + data->ty = s * ghost->tz; + data->tz = s * ghost->ty; + /* maintain handed-ness? or just do what feels right? */ + + /* should this affect rotation also? + * initial guess is 'yes', but get user feedback immediately! + */ +#if 0 + /* after turning this on, my guess becomes 'no' */ + data->ry = s * ghost->rz; + data->rz = s * ghost->ry; #endif } else { - data->tvec[1]= s * ghost->ty; - data->tvec[2]= s * ghost->tz; + data->ty = s * ghost->ty; + data->tz = s * ghost->tz; } data->dt = ghost->dt; |