Added options and credits tabs for the in-game UI menu. Credits tab is blank for now. Disabled smooth locomotion to address the player controller confusion issues (see my thesis). Smooth locomotion can be reactivated via the options menu.

This commit is contained in:
2025-05-25 20:07:14 +03:00
parent d3f41bd245
commit bc7217fce3
42 changed files with 4077 additions and 69 deletions

View File

@@ -13,6 +13,9 @@ public class PassangerSeat : LocomotionProvider
public CarTeleportButton ExitButton;
private XROrigin currentPassanger;
private LocomotionSystem currentPlayerLocomotion;
private bool wasSmoothLocomotionEnabled;
private ContinuousMoveProviderBase moveProvider;
void Start()
{
}
@@ -45,18 +48,22 @@ public class PassangerSeat : LocomotionProvider
private void disablePlayerLocomotion(XROrigin player)
{
Menu menu = player.GetComponentInChildren<Menu>();
if (menu == null) return;
if (menu != null) menu.DeactivateMenu();
menu.DeactivateMenu();
currentPlayerLocomotion = player.GetComponentInChildren<LocomotionSystem>();
moveProvider = player.GetComponentInChildren<ContinuousMoveProviderBase>();
LocomotionSystem locomotion = player.GetComponentInChildren<LocomotionSystem>();
currentPlayerLocomotion = locomotion;
//if (locomotion == null) return;
Debug.Log("LocomotionSystem of: " + locomotion + " disabled");
if (moveProvider != null)
wasSmoothLocomotionEnabled = moveProvider.enabled;
locomotion.gameObject.SetActive(false);
if (currentPlayerLocomotion != null)
{
Debug.Log("LocomotionSystem of: " + currentPlayerLocomotion + " disabled");
currentPlayerLocomotion.gameObject.SetActive(false);
}
}
public void ExitCar()
{
if (currentPassanger == null) return;
@@ -80,16 +87,17 @@ public class PassangerSeat : LocomotionProvider
private void enablePlayerLocomotion(XROrigin player)
{
Menu menu = player.GetComponentInChildren<Menu>();
//if (menu == null) return;
if (menu != null) menu.ReactivateMenu();
menu.ReactivateMenu();
if (currentPlayerLocomotion != null)
currentPlayerLocomotion.gameObject.SetActive(true);
//LocomotionSystem locomotion = player.GetComponentInChildren<LocomotionSystem>();
//if (locomotion == null) return;
currentPlayerLocomotion.gameObject.SetActive(true);
if (moveProvider != null)
moveProvider.enabled = wasSmoothLocomotionEnabled;
moveProvider = null;
}
// Update is called once per frame
void Update()
{