CarmenSandiego/Assets/UdonSharp/ViewTabletSpawner.cs
Jamie Greunbaum 39e227f264 - Added ability for players without camera permissions to watch camera output.
- Added a tablet spawner to let players view said camera output.
- Added many more reflection probes to the alleyway to try to fill in gaps.
- Moved round 2 signage around to fit in the camera view better.
- Round 2 sign text changed to use SDF textures for better clarity.
- Created better gizmo icons for CameraAnchor and CameraSwitcher.
- Light strip on modem now uses an already-available SDF texture.
- Performance mode is now the default camera mode.
2026-04-23 03:50:44 -04:00

27 lines
650 B
C#

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class ViewTabletSpawner : UdonSharpBehaviour
{
[SerializeField] private Transform _ViewTabletSpawn;
[SerializeField] private Transform _ViewTabletHeadRoot;
public void SpawnAtPlayerHead(VRCPlayerApi Player)
{
_ViewTabletHeadRoot.transform.SetPositionAndRotation(
Player.GetBonePosition(HumanBodyBones.Head),
Player.GetBoneRotation(HumanBodyBones.Head));
}
public void Despawn()
{
_ViewTabletHeadRoot.transform.localPosition = Vector3.zero;
_ViewTabletHeadRoot.transform.localRotation = Quaternion.identity;
}
}