Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-08-10 14:35:47 +0300
committerJulian Eisel <julian@blender.org>2020-08-10 14:40:11 +0300
commit727a744e3c3eba755767e718ed26cef3558e46a8 (patch)
tree057496b1e0c53fbf8245c1c432ab596e0956c647 /source/blender/windowmanager/xr/intern/wm_xr_draw.c
parent52a57af3d53d22e6d9dc0b8e3ad2566a6725b4fe (diff)
Fix broken behavior on active VR Landmark change
There would always be an unintended offset applied. Per design there should not be any offset when changing VR Landmarks, the view should just jump exactly to the Landmark. Due to the recent changes, we don't have to add, but substract the eye offset we apply to get the wanted behavior. Mistake in 607d745a79e0.
Diffstat (limited to 'source/blender/windowmanager/xr/intern/wm_xr_draw.c')
-rw-r--r--source/blender/windowmanager/xr/intern/wm_xr_draw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_draw.c b/source/blender/windowmanager/xr/intern/wm_xr_draw.c
index 684e59eb8b2..6f96d2ea6a0 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr_draw.c
+++ b/source/blender/windowmanager/xr/intern/wm_xr_draw.c
@@ -55,7 +55,7 @@ static void wm_xr_draw_matrices_create(const wmXrDrawData *draw_data,
copy_qt_qt(eye_pose.orientation_quat, draw_view->eye_pose.orientation_quat);
copy_v3_v3(eye_pose.position, draw_view->eye_pose.position);
- add_v3_v3(eye_pose.position, draw_data->eye_position_ofs);
+ sub_v3_v3(eye_pose.position, draw_data->eye_position_ofs);
if ((session_settings->flag & XR_SESSION_USE_POSITION_TRACKING) == 0) {
sub_v3_v3(eye_pose.position, draw_view->local_pose.position);
}