Skip to content

Commit 408eb4b

Browse files
committed
fix merge
1 parent f4be40c commit 408eb4b

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/UI/Panels/FreeCamPanel.cs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ namespace UnityExplorer.UI.Panels
1919
{
2020
public class FreeCamPanel : UEPanel
2121
{
22+
public enum FreeCameraType
23+
{
24+
New,
25+
Gameplay,
26+
Cloned,
27+
ForcedMatrix,
28+
}
29+
2230
public FreeCamPanel(UIBase owner) : base(owner)
2331
{
2432
try {
@@ -723,10 +731,21 @@ void FarClipInput_OnEndEdit(string input)
723731
UpdateClippingPlanes();
724732
}
725733

726-
public static bool ShouldOverrideInput(){
734+
public static bool IsConnectorActive()
735+
{
736+
return FreeCamPanel.connector != null && FreeCamPanel.connector.IsActive;
737+
}
738+
739+
public static bool ShouldOverrideInput()
740+
{
727741
return inFreeCamMode && blockGamesInputOnFreecamToggle.isOn;
728742
}
729743

744+
public static Camera GetFreecam()
745+
{
746+
return ourCamera;
747+
}
748+
730749
// Getters and Setters for camera position and rotation
731750
public static Vector3 GetCameraPosition(bool isAbsolute = false){
732751
if (isAbsolute) return CameraContainer.position;
@@ -775,6 +794,11 @@ public static void SetCameraRotation(Quaternion newRotation, bool isAbsolute = f
775794
CameraContainer.rotation = newRotation;
776795
}
777796
}
797+
798+
public static void SetFOV(float newFOV)
799+
{
800+
GetFreecam().fieldOfView = newFOV;
801+
}
778802
}
779803

780804
internal class FreeCamBehaviour : MonoBehaviour

0 commit comments

Comments
 (0)