Skip to content

Commit

Permalink
call offsersession after exiting immersive
Browse files Browse the repository at this point in the history
  • Loading branch information
cabanier committed Jul 17, 2023
1 parent 918105c commit d6de576
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions input-selection-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,16 @@
function onSessionEnded(event) {
if (event.session.isImmersive) {
xrButton.setSession(null);

if (navigator.xr.offerSession !== undefined) {
navigator.xr.offerSession('immersive-vr', {
requiredFeatures: ['local-floor']
}).then((session) => {
xrButton.setSession(session);
session.isImmersive = true;
onSessionStarted(session);
});
}
}
}

Expand Down

0 comments on commit d6de576

Please sign in to comment.