Skip to content

Commit

Permalink
try to un-delete second camera
Browse files Browse the repository at this point in the history
  • Loading branch information
rosehendrix committed Jul 19, 2024
1 parent 633332c commit 0f4413a
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions unity/Assets/Scripts/StretchAgentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,36 +69,36 @@ public override ActionFinished InitializeBody(ServerAction initializeAction) {
var secondaryCameraName = "SecondaryCamera";

// DISABLED UNTIL ROSE ASKS FOR SECOND GOPRO CAMERA
// // activate arm-camera
// Camera fp_camera_2 = m_CharacterController
// .transform.Find(secondaryCameraName)
// .GetComponent<Camera>();
// fp_camera_2.gameObject.SetActive(true);
// agentManager.registerAsThirdPartyCamera(fp_camera_2);
// if (initializeAction.antiAliasing != null) {
// agentManager.updateAntiAliasing(
// postProcessLayer: fp_camera_2.gameObject.GetComponentInChildren<PostProcessLayer>(),
// antiAliasing: initializeAction.antiAliasing
// );
// }
//
// activate arm-camera
Camera fp_camera_2 = m_CharacterController
.transform.Find(secondaryCameraName)
.GetComponent<Camera>();
fp_camera_2.gameObject.SetActive(true);
agentManager.registerAsThirdPartyCamera(fp_camera_2);
if (initializeAction.antiAliasing != null) {
agentManager.updateAntiAliasing(
postProcessLayer: fp_camera_2.gameObject.GetComponentInChildren<PostProcessLayer>(),
antiAliasing: initializeAction.antiAliasing
);
}


// set up primary camera parameters for stretch specific parameters
m_Camera.transform.localPosition = defaultMainCameraLocalPosition;
m_Camera.transform.localEulerAngles = defaultMainCameraLocalRotation;
m_Camera.fieldOfView = defaultMainCameraFieldOfView;

// DISABLED UNTIL ROSE ASKS FOR SECOND GOPRO CAMERA
// // set up secondary camera paremeters for stretch bot
// fp_camera_2.transform.localPosition = defaultSecondaryCameraLocalPosition;
// fp_camera_2.transform.localEulerAngles = defaultSecondaryCameraLocalRotation;
// fp_camera_2.fieldOfView = defaultSecondaryCameraFieldOfView;
// set up secondary camera paremeters for stretch bot
fp_camera_2.transform.localPosition = defaultSecondaryCameraLocalPosition;
fp_camera_2.transform.localEulerAngles = defaultSecondaryCameraLocalRotation;
fp_camera_2.fieldOfView = defaultSecondaryCameraFieldOfView;

// set up lens distortion for stretch bot cameras
if (distortLens == true) {
enableLensDistortion(m_Camera);
// DISABLED UNTIL ROSE ASKS FOR SECOND GOPRO CAMERA
// enableLensDistortion(fp_camera_2);
enableLensDistortion(fp_camera_2);
}

// limit camera from looking too far down/up
Expand All @@ -115,11 +115,11 @@ public override ActionFinished InitializeBody(ServerAction initializeAction) {
}

// DISABLED UNTIL ROSE ASKS FOR SECOND GOPRO CAMERA
// var secondaryCameraParams = new CameraParameters();
// var setSecondaryParams = initializeAction.thirdPartyCameraParameters?.TryGetValue(
// secondaryCameraName,
// out secondaryCameraParams
// );
var secondaryCameraParams = new CameraParameters();
var setSecondaryParams = initializeAction.thirdPartyCameraParameters?.TryGetValue(
secondaryCameraName,
out secondaryCameraParams
);

// if (setSecondaryParams.GetValueOrDefault()) {
// CameraParameters.setCameraParameters(fp_camera_2, secondaryCameraParams);
Expand Down

0 comments on commit 0f4413a

Please sign in to comment.