Added slideshow (disabled, but fully functional, not actually part of the player experience, just for fun). Moved teleport button for bolt car onto its front. Added signs for barred areas and server entry guiding.

This commit is contained in:
2025-05-09 19:18:31 +03:00
parent fe60892585
commit 03a3ca570e
94 changed files with 3519 additions and 21 deletions

View File

@@ -6,10 +6,10 @@ using UnityEngine;
using UnityEngine.XR.Content.Interaction;
using UnityEngine.XR.Interaction.Toolkit;
public class PassangerSeat : MonoBehaviour
public class PassangerSeat : LocomotionProvider
{
// Start is called before the first frame update
public TeleportLocation ExitSpot;
public GameObject ExitSpot;
public CarTeleportButton ExitButton;
private XROrigin currentPassanger;
private LocomotionSystem currentPlayerLocomotion;
@@ -26,6 +26,8 @@ public class PassangerSeat : MonoBehaviour
if (player == null || currentPassanger != null) return;
TutorialController cameraChild = player.GetComponentInChildren<TutorialController>();
TunnelingVignetteController vignetteController = player.GetComponentInChildren<TunnelingVignetteController>();
LocomotionVignetteProvider vignetteProvider = player.GetComponentInChildren<LocomotionVignetteProvider>();
if (cameraChild == null) return;
Transform cameraTransform = cameraChild.transform.parent.transform;
@@ -37,6 +39,7 @@ public class PassangerSeat : MonoBehaviour
player.transform.localPosition = -cameraShift;
player.transform.localRotation = Quaternion.identity;
cameraTransform.localRotation = this.transform.rotation;
BeginLocomotion();
disablePlayerLocomotion(player);
}
private void disablePlayerLocomotion(XROrigin player)
@@ -57,6 +60,7 @@ public class PassangerSeat : MonoBehaviour
public void ExitCar()
{
if (currentPassanger == null) return;
EndLocomotion();
enablePlayerLocomotion(currentPassanger);
TutorialController cameraChild = currentPassanger.GetComponentInChildren<TutorialController>();
@@ -68,7 +72,7 @@ public class PassangerSeat : MonoBehaviour
currentPassanger.transform.SetParent(null);
// Put the player outside;
currentPassanger.transform.localPosition = ExitSpot.transform.localPosition;
currentPassanger.transform.localPosition = ExitSpot.transform.position;
cameraTransform.rotation = ExitSpot.transform.rotation;
currentPassanger = null;
}