[Bf-blender-cvs] [0a86ab6639e] master: Fix T96925: Fast diagonal movement in walk navigation
Pratik Borhade
noreply at git.blender.org
Mon Apr 25 15:46:04 CEST 2022
Commit: 0a86ab6639e8ec535808e74b66d6b2ec6b1307bd
Author: Pratik Borhade
Date: Mon Apr 25 13:07:18 2022 +0200
Branches: master
https://developer.blender.org/rB0a86ab6639e8ec535808e74b66d6b2ec6b1307bd
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
===================================================================
M source/blender/editors/space_view3d/view3d_navigate_walk.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list