XR Game seems to have a fixed "frontal direction" in real life space

When I use Unity to develop an XR game for Quest 3, every time I open the game, the game seems to have a fixed “frontal direction” in real-life space, instead of defaulting to the direction I am currently facing as frontal. How can I solve this problem?
And also, before discussing solutions, what I want to understand first is why this issue arises. For example, if I first open the game facing my desk, and then close the game, even if I reopen the game three days later while facing my window, the game seems to remember the direction of my desk and defaults to that as the front. This causes me to not see the main menu at the start when I open the game facing the window, but instead, I see the side of things, because the main menu is defaulted to display in the direction facing the desk.

For starters, what packages are you using in your app? There are several different ways to develop an app for Quest 3 in Unity, most notably:

  • Meta Interaction SDK
  • Oculus XR Plug-in
  • AR Foundation and Unity OpenXR:Meta

The answer to your question requires this information. It’s always helpful to include version numbers and the version number of Unity as well.

Thanks! I am currently using OpenXR plugin with Meta Quest feature group, the version of Unity is 2022.3.19f1. And for the problem I encounter, seem like it only happened after I try to add AR feature in the game, and I feel it might be the OS mapping my room so it kind of sets a default forward direction for the first time I open the game.

How do you define “front”? What do you mean here exactly? That the environment is not re-aligned correctly after you doff and re-don the headset? Or that your AR Camera is rendering passthrough in a direction that you are not actually facing? Something else?

Hi! Thank you for response!
In my Unity game, there is a start menu that players face by default when the game launches. Suppose a player opens the game for the first time facing their desk in real life, everything works fine and the player faces the in-game menu. However, if the player exits the game and reopens it a few days later, and their orientation has changed—say, now facing away from their desk—they will also be facing away from the start menu upon launching the game. This differs from games like Beat Saber, where the main menu automatically adjusts to face the player regardless of their real-world orientation when the game is opened. Note that by “menu facing the player,” I do not mean that the menu rotates following the player’s head movements, but rather that the menu should automatically face the player whenever the game starts.

This sounds like an error in your app logic. The player can face any direction they wish. Your app should use the player’s facing direction to spawn the menu at a position where they can see it, and I recommend that you also provide ways for them to re-center and/or move the menu.