Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChangeFOV changes fov of segmentation, depth, etc. #1234

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions unity/Assets/Scripts/AgentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ public void updateThirdPartyCameraImageSynthesis(bool status) {
}
}

private void updateCameraProperties(
private ActionFinished updateCameraProperties(
Camera camera,
Vector3? position,
Vector3? rotation,
Expand Down Expand Up @@ -693,7 +693,7 @@ private void updateCameraProperties(
imageSynthesis.OnCameraChange();
}

this.activeAgent().actionFinished(success: true);
return ActionFinished.Success;
}

private void assertFovInBounds(float fov) {
Expand Down Expand Up @@ -821,7 +821,7 @@ public OptionalVector3(float? x = null, float? y = null, float? z = null) {

//allows repositioning and changing of values of agent's primary camera
//note this does not support changing the main camera of multiple agents beyond the primary for now
public void UpdateMainCamera(
public ActionFinished UpdateMainCamera(
OptionalVector3 position = null,
OptionalVector3 rotation = null,
float? fieldOfView = null,
Expand Down Expand Up @@ -855,7 +855,7 @@ public void UpdateMainCamera(
optionalVector3: rotation,
defaultsOnNull: oldRotation
);
updateCameraProperties(
return updateCameraProperties(
camera: agentMainCam,
position: targetPosition,
rotation: targetRotation,
Expand All @@ -873,7 +873,7 @@ public void UpdateMainCamera(
}

// Updates third party cameras, including secondary camera of stretch agent
public void UpdateThirdPartyCamera(
public ActionFinished UpdateThirdPartyCamera(
int thirdPartyCameraId = 0,
OptionalVector3 position = null,
OptionalVector3 rotation = null,
Expand Down Expand Up @@ -922,7 +922,7 @@ public void UpdateThirdPartyCamera(
optionalVector3: rotation,
defaultsOnNull: oldRotation
);
updateCameraProperties(
return updateCameraProperties(
camera: thirdPartyCamera,
position: targetPosition,
rotation: targetRotation,
Expand Down
13 changes: 0 additions & 13 deletions unity/Assets/Scripts/DebugInputField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ public void Execute(string command) {

break;
}

//fpin using stretch bot as source mesh
case "initpins": {
Dictionary<string, object> action = new Dictionary<string, object>();
Expand Down Expand Up @@ -3165,18 +3164,6 @@ IEnumerator executeBatch(JArray jActions) {
CurrentActiveController().ProcessControlCommand(action);
break;
}

case "fov": {
Dictionary<string, object> comm = new Dictionary<string, object>();
comm["action"] = "ChangeFOV";
comm["fieldOfView"] = float.Parse(splitcommand[1]);
if (splitcommand.Length > 2) {
comm["camera"] = splitcommand[2];
}

CurrentActiveController().ProcessControlCommand(comm);
break;
}
case "teles": {
ServerAction action = new ServerAction();
action.action = "TeleportFull";
Expand Down
Loading
Loading