diff options
author | Julian Eisel <julian@blender.org> | 2020-08-14 14:29:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-08-14 14:29:03 +0300 |
commit | 6a561367d0aecceb14f94072e0ec19466d130194 (patch) | |
tree | 6aee87cf9cfc3d37054c33dbd1076303cb8d9868 /source/blender | |
parent | cc6c52768a9e6d5c82f35e953a6e53ece76d3a78 (diff) | |
parent | ab3a65151568d4f0cb0ac5747dd074cd8697c1d8 (diff) |
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/xr/intern/wm_xr_session.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_session.c b/source/blender/windowmanager/xr/intern/wm_xr_session.c index f3ce7be993f..78dadbf9513 100644 --- a/source/blender/windowmanager/xr/intern/wm_xr_session.c +++ b/source/blender/windowmanager/xr/intern/wm_xr_session.c @@ -250,9 +250,14 @@ void wm_xr_session_draw_data_update(const wmXrSessionState *state, switch (event) { case SESSION_STATE_EVENT_START: - /* We want to start the session exactly at landmark position. - * Run-times may have a non-[0,0,0] starting position that we have to subtract for that. */ - copy_v3_v3(draw_data->eye_position_ofs, draw_view->local_pose.position); + if (use_position_tracking) { + /* We want to start the session exactly at landmark position. + * Run-times may have a non-[0,0,0] starting position that we have to subtract for that. */ + copy_v3_v3(draw_data->eye_position_ofs, draw_view->local_pose.position); + } + else { + copy_v3_fl(draw_data->eye_position_ofs, 0.0f); + } break; /* This should be triggered by the VR add-on if a landmark changes. */ case SESSION_STATE_EVENT_RESET_TO_BASE_POSE: |