CarmenSandiego/Assets/UdonSharp/PlayerTeleporter.cs
Jamie Greunbaum 22a25b65d8 - Player podiums are claimed when teleported to.
- Fixed issue that caused screens to not reset after the final round.
- Fixed render target for videos so the aspect ratio is correct.
- Tweaked a bunch of textures and various unimportant things.
2025-08-03 19:26:50 -04:00

48 lines
1.3 KiB
C#

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class PlayerTeleporter : UdonSharpBehaviour
{
[SerializeField] private Transform _HostTeleportLocation;
[SerializeField] private Transform _Player1TeleportLocation;
[SerializeField] private Transform _Player2TeleportLocation;
[SerializeField] private Transform _Player3TeleportLocation;
[Space]
[SerializeField] private PlayerPodium[] _PlayerPodiums;
[Space]
[SerializeField] private Transform _ModemArrivalsTeleportLocation;
public void TeleportToHostPosition()
{
Networking.LocalPlayer.TeleportTo(_HostTeleportLocation.position, _HostTeleportLocation.rotation);
}
public void TeleportToPlayer1Position()
{
Networking.LocalPlayer.TeleportTo(_Player1TeleportLocation.position, _Player1TeleportLocation.rotation);
_PlayerPodiums[0].SetPlayerName();
}
public void TeleportToPlayer2Position()
{
Networking.LocalPlayer.TeleportTo(_Player2TeleportLocation.position, _Player2TeleportLocation.rotation);
_PlayerPodiums[1].SetPlayerName();
}
public void TeleportToPlayer3Position()
{
Networking.LocalPlayer.TeleportTo(_Player3TeleportLocation.position, _Player3TeleportLocation.rotation);
_PlayerPodiums[2].SetPlayerName();
}
}