By default, in walk-mode, Blender moves the camera/view along the model Z axis for up/down movement. But when the camera is looking straight down / straight up, this movement resembles zooming in / zooming out as the up/down movement is not relative to the view.
How can I change this behavior so that WALK_BIT_UP and WALK_BIT_DOWN moves the view up/down relative to the view?
My understanding is that it requires changes in the walkApply() function inside “source\blender\editors\space_view3d\view3d_walk.c”;
I believe the part of code that needs to be modified is:
if ((walk->active_directions & WALK_BIT_UP)) {
direction -= 1;
}
if ((walk->active_directions & WALK_BIT_DOWN)) {
direction = 1;
}
*copy_v3_fl3(dvec_tmp, 0.0f, 0.0f, direction);* //THIS IS WHAT NEEDS TO BE CHANGED
add_v3_v3(dvec, dvec_tmp);
However, this seems to require an understanding of model view matrices, and I’m totally lost. Any help WRT exactly what change needs to be done here to achieve the required behavior (shown in above image) will be much appreciated.
EDIT: changed Fig 2 heading in the above image;