- Added anchor positions for all the cameras during all three rounds. - Added a separate video display for round 2 specifically for a camera view.
25 lines
657 B
C#
25 lines
657 B
C#
|
|
using MMMaellon.LightSync;
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
using VRC.Udon;
|
|
|
|
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
|
public class CameraAnchor : UdonSharpBehaviour
|
|
{
|
|
[SerializeField] private float FOV = 60.0f;
|
|
[SerializeField] private float FarClippingPlane = 1000.0f;
|
|
|
|
|
|
public void AttachCamera(Camera CameraComponent)
|
|
{
|
|
CameraComponent.gameObject.SetActive(true);
|
|
CameraComponent.transform.parent = transform;
|
|
CameraComponent.fieldOfView = FOV;
|
|
CameraComponent.farClipPlane = FarClippingPlane;
|
|
CameraComponent.GetComponent<LightSync>().TeleportToLocalSpace(Vector3.zero, Quaternion.identity, true);
|
|
}
|
|
}
|