- Added a method for animating FOV, and added it to the ending cameras.

- Started reworking Modem cameras.
- Finally fixed ScreenUV shader, so the Modem's static looks correct.
This commit is contained in:
2026-03-11 02:34:00 -04:00
parent 23133f3aee
commit 6ba521ea56
15 changed files with 815 additions and 320 deletions
+134 -1
View File
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 3
Data: 5
- Name:
Entry: 7
Data:
@@ -213,6 +213,139 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: CameraRoot
- Name: $v
Entry: 7
Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: CameraRoot
- Name: <UserType>k__BackingField
Entry: 7
Data: 13|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Transform, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 13
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 14|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 3
- Name:
Entry: 7
Data: 15|UnityEngine.SpaceAttribute, UnityEngine.CoreModule
- Name: height
Entry: 4
Data: 8
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 16|UnityEngine.TooltipAttribute, UnityEngine.CoreModule
- Name: tooltip
Entry: 1
Data: Changing the Z scale of this object will change the FOV of the attached
camera.
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 17|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _AttachedCamera
- Name: $v
Entry: 7
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _AttachedCamera
- Name: <UserType>k__BackingField
Entry: 7
Data: 19|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Camera, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 19
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 20|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
+28 -6
View File
@@ -12,16 +12,38 @@ public class CameraAnchor : UdonSharpBehaviour
[SerializeField] private float FOV = 60.0f;
[SerializeField] private float NearClippingPlane = 0.3f;
[SerializeField] private float FarClippingPlane = 1000.0f;
[Space]
[Tooltip("Changing the Z scale of this object will change the FOV of the attached camera.")]
[SerializeField] private Transform CameraRoot;
private Camera _AttachedCamera = null;
void LateUpdate()
{
if (_AttachedCamera)
{
if (CameraRoot.childCount <= 0)
{
_AttachedCamera = null;
}
else
{
_AttachedCamera.fieldOfView = FOV * CameraRoot.transform.localScale.z;
}
}
}
public void AttachCamera(Camera CameraComponent)
{
CameraComponent.gameObject.SetActive(true);
CameraComponent.transform.parent = transform;
CameraComponent.fieldOfView = FOV;
CameraComponent.nearClipPlane = NearClippingPlane;
CameraComponent.farClipPlane = FarClippingPlane;
CameraComponent.GetComponent<LightSync>().TeleportToLocalSpace(Vector3.zero, Quaternion.identity, true);
_AttachedCamera = CameraComponent;
_AttachedCamera.gameObject.SetActive(true);
_AttachedCamera.transform.parent = CameraRoot;
_AttachedCamera.fieldOfView = FOV;
_AttachedCamera.nearClipPlane = NearClippingPlane;
_AttachedCamera.farClipPlane = FarClippingPlane;
_AttachedCamera.GetComponent<LightSync>().TeleportToLocalSpace(Vector3.zero, Quaternion.identity, true);
}
@@ -46,6 +46,7 @@ public class CameraControllerRound2 : CameraControllerBase
Player2CameraAnchor.AttachCamera(Player2Camera);
HostAndWinnerCameraAnchor.AttachCamera(HostAndWinnerCamera);
LocationBoardCameraAnchor.AttachCamera(LocationBoardCamera);
ModemCameraAnchor.AttachCamera(PrimaryFocusCamera);
VideoPlayerCameraAnchor.AttachCamera(VideoPlayerCamera);
}
@@ -102,6 +103,11 @@ public class CameraControllerRound2 : CameraControllerBase
SwitchToLiveCamera(LocationBoardCamera);
}
public void SwitchToModemCamera()
{
SwitchToLiveCamera(PrimaryFocusCamera);
}
public void SwitchToVideoPlayerCamera()
{
SwitchToLiveCamera(VideoPlayerCamera);