diff options
author | Pratik Borhade <PratikPB2123> | 2022-04-25 14:07:18 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2022-04-25 16:46:00 +0300 |
commit | 0a86ab6639e8ec535808e74b66d6b2ec6b1307bd (patch) | |
tree | 2848a6afb03fcc1f5e0b6aa1a4de33d147634434 | |
parent | d2a01bb7cb5c61cc778057c5b976d19c8d5cd506 (diff) |
Fix T96925: Fast diagonal movement in walk navigation
View moves faster with two active directions.
This is probably because `dvec` is not normalized when moving in two directions.
Normalizing this direction vector will fix the problem.
Differential Revision: https://developer.blender.org/D14729
-rw-r--r-- | source/blender/editors/space_view3d/view3d_navigate_walk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.c b/source/blender/editors/space_view3d/view3d_navigate_walk.c index 18ed88aeec6..19e064438fc 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_walk.c +++ b/source/blender/editors/space_view3d/view3d_navigate_walk.c @@ -1205,7 +1205,6 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) dvec_tmp[2] = 0.0f; } - normalize_v3(dvec_tmp); add_v3_v3(dvec, dvec_tmp); } @@ -1226,7 +1225,6 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) dvec_tmp[1] = direction * rv3d->viewinv[0][1]; dvec_tmp[2] = 0.0f; - normalize_v3(dvec_tmp); add_v3_v3(dvec, dvec_tmp); } @@ -1249,6 +1247,8 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) } } + normalize_v3(dvec); + /* apply movement */ mul_v3_fl(dvec, walk->speed * time_redraw); } |