mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2025-07-18 17:38:01 +08:00
Added checks to avoid the look-at feature from getting in the way of the connector commands.
This commit is contained in:
@ -734,6 +734,11 @@ namespace UnityExplorer.UI.Panels
|
|||||||
UpdateClippingPlanes();
|
UpdateClippingPlanes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsConnectorActive()
|
||||||
|
{
|
||||||
|
return FreeCamPanel.connector != null && FreeCamPanel.connector.IsActive;
|
||||||
|
}
|
||||||
|
|
||||||
public static bool ShouldOverrideInput(){
|
public static bool ShouldOverrideInput(){
|
||||||
return inFreeCamMode && blockGamesInputOnFreecamToggle.isOn;
|
return inFreeCamMode && blockGamesInputOnFreecamToggle.isOn;
|
||||||
}
|
}
|
||||||
@ -849,17 +854,17 @@ namespace UnityExplorer.UI.Panels
|
|||||||
FreeCamPanel.followObjectLastRotation = FreeCamPanel.followObject.transform.rotation;
|
FreeCamPanel.followObjectLastRotation = FreeCamPanel.followObject.transform.rotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FreeCamPanel.lookAtObject != null && !FreeCamPanel.IsConnectorActive())
|
||||||
|
{
|
||||||
|
movingTransform.LookAt(FreeCamPanel.lookAtObject.transform);
|
||||||
|
}
|
||||||
|
|
||||||
UpdateRelativeMatrix();
|
UpdateRelativeMatrix();
|
||||||
UpdateRealCamera();
|
UpdateRealCamera();
|
||||||
|
|
||||||
FreeCamPanel.connector?.ExecuteCameraCommand(FreeCamPanel.GetFreecam());
|
FreeCamPanel.connector?.ExecuteCameraCommand(FreeCamPanel.GetFreecam());
|
||||||
|
|
||||||
FreeCamPanel.UpdatePositionInput();
|
FreeCamPanel.UpdatePositionInput();
|
||||||
|
|
||||||
if (FreeCamPanel.lookAtObject != null)
|
|
||||||
{
|
|
||||||
movingTransform.LookAt(FreeCamPanel.lookAtObject.transform);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user