Skip to content

Commit

Permalink
Completed re-enabling of Stretch arm-camera
Browse files Browse the repository at this point in the history
  • Loading branch information
elimvb committed Jul 22, 2024
1 parent 0f4413a commit 927c9be
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions unity/Assets/Scripts/StretchAgentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ 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)
Expand All @@ -82,13 +81,11 @@ public override ActionFinished InitializeBody(ServerAction initializeAction) {
);
}


// 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;
Expand All @@ -97,7 +94,6 @@ public override ActionFinished InitializeBody(ServerAction initializeAction) {
// 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);
}

Expand All @@ -114,16 +110,15 @@ public override ActionFinished InitializeBody(ServerAction initializeAction) {
this.maxDownwardLookAngle = initializeAction.maxDownwardLookAngle;
}

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

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

// enable stretch arm component
Debug.Log("initializing stretch arm");
Expand Down

0 comments on commit 927c9be

Please sign in to comment.