From 98537977c01e92fe9806eb79d8154b9105f5548e Mon Sep 17 00:00:00 2001 From: Winson Han Date: Tue, 20 Aug 2024 14:41:25 -0700 Subject: [PATCH] syncing major changes from gopro branches --- .../PhysicsSceneManager.prefab | 131 ++- unity/Assets/Scenes/FloorPlan1_physics.unity | 2 +- unity/Assets/Scripts/DebugInputField.cs | 29 + .../Assets/Scripts/DroneFPSAgentController.cs | 4 +- .../PhysicsRemoteFPSAgentController.cs | 4 +- .../Assets/Scripts/StretchAgentController.cs | 368 ++++++++- .../FirstPersonCharacter/PostProcessing.meta | 8 + .../Stretch_Go_Pro_Post_Profile.asset | 50 ++ .../Stretch_Go_Pro_Post_Profile.asset.meta | 8 + .../Prefabs/FPSController.prefab | 750 ++++++++++++++++-- .../Assets/UnitTests/Procedural/Movement.meta | 8 + unity/ProjectSettings/TagManager.asset | 4 +- 12 files changed, 1275 insertions(+), 91 deletions(-) create mode 100644 unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing.meta create mode 100644 unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing/Stretch_Go_Pro_Post_Profile.asset create mode 100644 unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing/Stretch_Go_Pro_Post_Profile.asset.meta create mode 100644 unity/Assets/UnitTests/Procedural/Movement.meta diff --git a/unity/Assets/Physics/SceneSetupPrefabs/PhysicsSceneManager.prefab b/unity/Assets/Physics/SceneSetupPrefabs/PhysicsSceneManager.prefab index 17f5ea625c..222490a2ff 100644 --- a/unity/Assets/Physics/SceneSetupPrefabs/PhysicsSceneManager.prefab +++ b/unity/Assets/Physics/SceneSetupPrefabs/PhysicsSceneManager.prefab @@ -31,7 +31,8 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] + m_Children: + - {fileID: 3036343922174695752} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -256,3 +257,131 @@ MonoBehaviour: - {fileID: 2100000, guid: b7babe292cedd6644bb0e057878a58c4, type: 2} - {fileID: 2100000, guid: 8d07f44645275464fa8e0a0a82043dfb, type: 2} - {fileID: 2100000, guid: a426c8270276e6f46b8f83b927bfe225, type: 2} +--- !u!1 &2571171791558639256 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6414754439291210063} + - component: {fileID: 8272309782993795336} + m_Layer: 19 + m_Name: ppProfilePrimary + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6414754439291210063 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2571171791558639256} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.009, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 3036343922174695752} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8272309782993795336 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2571171791558639256} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} + m_Name: + m_EditorClassIdentifier: + sharedProfile: {fileID: 11400000, guid: a5d160b4553f5e84aaca887c9309afc9, type: 2} + isGlobal: 1 + blendDistance: 0 + weight: 1 + priority: 0 +--- !u!1 &4145085167880843110 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3036343922174695752} + m_Layer: 0 + m_Name: ppProfiles + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3036343922174695752 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4145085167880843110} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 6414754439291210063} + - {fileID: 1724417223204369504} + m_Father: {fileID: 4523222967138746} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8529546001303059388 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1724417223204369504} + - component: {fileID: 9048358252671230580} + m_Layer: 20 + m_Name: ppProfileSecondary + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1724417223204369504 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8529546001303059388} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.009, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 3036343922174695752} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &9048358252671230580 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8529546001303059388} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} + m_Name: + m_EditorClassIdentifier: + sharedProfile: {fileID: 11400000, guid: e502ae08dd22f49f58743d4aace40ba9, type: 2} + isGlobal: 1 + blendDistance: 0 + weight: 1 + priority: 0 diff --git a/unity/Assets/Scenes/FloorPlan1_physics.unity b/unity/Assets/Scenes/FloorPlan1_physics.unity index 206d681500..af8fca191d 100644 --- a/unity/Assets/Scenes/FloorPlan1_physics.unity +++ b/unity/Assets/Scenes/FloorPlan1_physics.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.71791136, g: 0.73149365, b: 0.7516093, a: 1} + m_IndirectSpecularColor: {r: 0.7130405, g: 0.72730166, b: 0.74681276, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: diff --git a/unity/Assets/Scripts/DebugInputField.cs b/unity/Assets/Scripts/DebugInputField.cs index 0fc77e4c08..616e5ab85d 100644 --- a/unity/Assets/Scripts/DebugInputField.cs +++ b/unity/Assets/Scripts/DebugInputField.cs @@ -1108,6 +1108,35 @@ public void Execute(string command) { break; } + + case "ldtoggle": { + Dictionary action = new Dictionary(); + + action["action"] = "ToggleLensDistortion"; + if (splitcommand.Length > 1) { + action["state"] = bool.Parse(splitcommand[1]); + } + + CurrentActiveController().ProcessControlCommand(action); + break; + } + + case "ssc": { + Dictionary action = new Dictionary(); + + action["action"] = "SetUpSecondaryCamera"; + CurrentActiveController().ProcessControlCommand(action); + break; + } + case "dsc": { + Dictionary action = new Dictionary(); + + action["action"] = "DisableSecondaryCamera"; + CurrentActiveController().ProcessControlCommand(action); + break; + } + + case "rpanm": { Dictionary action = new Dictionary(); diff --git a/unity/Assets/Scripts/DroneFPSAgentController.cs b/unity/Assets/Scripts/DroneFPSAgentController.cs index 6a916cce30..11c6f8986c 100644 --- a/unity/Assets/Scripts/DroneFPSAgentController.cs +++ b/unity/Assets/Scripts/DroneFPSAgentController.cs @@ -52,7 +52,9 @@ public override ActionFinished InitializeBody(ServerAction initializeAction) { cc.radius = m_CharacterController.radius; cc.height = m_CharacterController.height; - m_Camera.GetComponent().enabled = false; + // we should do this in a different way later, now that post-processing effects are meant to be + // disabled by turning off the referenced post-processing volume in its dedicated stack, not by toggling + // on and off the individual layer component m_Camera.GetComponent().enabled = false; // camera position set forward a bit for drone diff --git a/unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs b/unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs index a827d8200a..da7a8004b8 100644 --- a/unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs +++ b/unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs @@ -51,7 +51,9 @@ public override ActionFinished InitializeBody(ServerAction initializeAction) { cc.radius = m_CharacterController.radius; cc.height = m_CharacterController.height; - m_Camera.GetComponent().enabled = false; + // we should do this in a different way later, now that post-processing effects are meant to be + // disabled by turning off the referenced post-processing volume in its dedicated stack, not by toggling + // on and off the individual layer component m_Camera.GetComponent().enabled = false; // camera position diff --git a/unity/Assets/Scripts/StretchAgentController.cs b/unity/Assets/Scripts/StretchAgentController.cs index e342445345..920e0c51be 100644 --- a/unity/Assets/Scripts/StretchAgentController.cs +++ b/unity/Assets/Scripts/StretchAgentController.cs @@ -10,25 +10,59 @@ namespace UnityStandardAssets.Characters.FirstPerson { public partial class StretchAgentController : ArmAgentController { + // public int gripperOpennessState = 0; + + // //define default parameters for both main camera and secondary camera, specific to real-life stretch bot rig + // //these are kind of magic numbers, but can be adjusted via UpdateMainCamera and UpdateThirdPartyCamera as needed if our + // //real rig changes + // private Vector3 defaultMainCameraLocalPosition = new Vector3( + // 0.001920350f, + // 0.544700900f, + // 0.067880400f + // ); + // private Vector3 defaultMainCameraLocalRotation = new Vector3(30f, 0, 0); + // private float defaultMainCameraFieldOfView = 59f; + // private Vector3 defaultSecondaryCameraLocalPosition = new Vector3( + // 0.053905130f, + // 0.523833600f, + // -0.058848570f + // ); + // private Vector3 defaultSecondaryCameraLocalRotation = new Vector3(50f, 90f, 0); + // private float defaultSecondaryCameraFieldOfView = 59f; + public int gripperOpennessState = 0; //define default parameters for both main camera and secondary camera, specific to real-life stretch bot rig //these are kind of magic numbers, but can be adjusted via UpdateMainCamera and UpdateThirdPartyCamera as needed if our //real rig changes - private Vector3 defaultMainCameraLocalPosition = new Vector3( - 0.001920350f, - 0.544700900f, - 0.067880400f - ); + private Vector3 defaultMainCameraLocalPosition = new Vector3(0.001920350f, 0.544700900f, 0.067880400f); private Vector3 defaultMainCameraLocalRotation = new Vector3(30f, 0, 0); private float defaultMainCameraFieldOfView = 59f; - private Vector3 defaultSecondaryCameraLocalPosition = new Vector3( - 0.053905130f, - 0.523833600f, - -0.058848570f - ); - private Vector3 defaultSecondaryCameraLocalRotation = new Vector3(50f, 90f, 0); + private Vector3 defaultSecondaryCameraLocalPosition = new Vector3(0.053905130f, 0.523833600f, -0.058848570f); + private Vector3 defaultSecondaryCameraLocalRotation =new Vector3(50f, 90f, 0); private float defaultSecondaryCameraFieldOfView = 59f; + private Vector3[] defaultGoProCameraLocalPositions = new Vector3[] + { + new Vector3(-0.1299001f, 0.5560812f, 0.02734984f), + new Vector3(0.04f, 0.5560812f, 0f), + new Vector3(-0.1675288f, 0.5560812f, -0.03782497f), + new Vector3(-0.1376f, 0.4340732f, 0.006196275f) + }; + private Vector3[] defaultGoProCameraLocalEulerAngles = new Vector3[] + { + new Vector3(20f, 0f, 0f), + new Vector3(30f, 120f, 0f), + new Vector3(20f, -120f, 0f), + new Vector3(90f, 0f, 0f) + }; + + private float defaultGoProCameraFieldOfView = 69f; + protected bool applyActionNoise = true; + protected float movementGaussianMu = 0.001f; + protected float movementGaussianSigma = 0.005f; + protected float rotateGaussianMu = 0.0f; + protected float rotateGaussianSigma = 0.5f; + protected bool allowHorizontalMovement = false; public StretchAgentController( BaseAgentComponent baseAgentComponent, @@ -64,8 +98,6 @@ public override ActionFinished InitializeBody(ServerAction initializeAction) { standingLocalCameraPosition = m_Camera.transform.localPosition; crouchingLocalCameraPosition = m_Camera.transform.localPosition; - // set up main camera parameters - m_Camera.fieldOfView = 65f; var secondaryCameraName = "SecondaryCamera"; @@ -82,6 +114,29 @@ public override ActionFinished InitializeBody(ServerAction initializeAction) { ); } + // activate GoPro cameras + Transform goProCameraGroup = m_CharacterController.transform.Find("GoProCameras"); + goProCameraGroup.gameObject.SetActive(true); + + Camera[] goProCameras = new Camera[goProCameraGroup.childCount]; + + // Assign each pre-existing camera to goProCameras array, and set up their codified parameters + for (int i = 0; i < goProCameras.Length; i++) { + goProCameras[i] = goProCameraGroup.GetChild(i).GetComponent(); + + goProCameras[i].transform.localPosition = defaultGoProCameraLocalPositions[i]; + goProCameras[i].transform.localEulerAngles = defaultGoProCameraLocalEulerAngles[i]; + goProCameras[i].fieldOfView = defaultGoProCameraFieldOfView; + + agentManager.registerAsThirdPartyCamera(goProCameras[i]); + if (initializeAction.antiAliasing != null) { + agentManager.updateAntiAliasing( + postProcessLayer: goProCameras[i].gameObject.GetComponentInChildren(), + antiAliasing: initializeAction.antiAliasing + ); + } + } + // set up primary camera parameters for stretch specific parameters m_Camera.transform.localPosition = defaultMainCameraLocalPosition; m_Camera.transform.localEulerAngles = defaultMainCameraLocalRotation; @@ -658,5 +713,292 @@ public void RotateCameraMount(float degrees, bool secondary = false) { actionFinished(false); } } + + public void SetUpSecondaryCamera(ServerAction initializeAction){ + if (agentManager.thirdPartyCameras.Count == 0) { + var secondaryCameraName = "SecondaryCamera"; + + // activate arm-camera + Camera fp_camera_2 = m_CharacterController.transform.Find(secondaryCameraName).GetComponent(); + fp_camera_2.gameObject.SetActive(true); + agentManager.registerAsThirdPartyCamera(fp_camera_2); + if (initializeAction.antiAliasing != null) { + agentManager.updateAntiAliasing( + postProcessLayer: fp_camera_2.gameObject.GetComponentInChildren(), + antiAliasing: initializeAction.antiAliasing + ); + } + + // 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; + + // limit camera from looking too far down/up + if (Mathf.Approximately(initializeAction.maxUpwardLookAngle, 0.0f)) { + this.maxUpwardLookAngle = 25f; + } else { + this.maxUpwardLookAngle = initializeAction.maxUpwardLookAngle; + } + + if (Mathf.Approximately(initializeAction.maxDownwardLookAngle, 0.0f)) { + this.maxDownwardLookAngle = 90f; + } else { + this.maxDownwardLookAngle = initializeAction.maxDownwardLookAngle; + } + + var secondaryCameraParams = new CameraParameters(); + var setSecondaryParams = initializeAction.thirdPartyCameraParameters?.TryGetValue(secondaryCameraName, out secondaryCameraParams); + + if (setSecondaryParams.GetValueOrDefault()) { + CameraParameters.setCameraParameters(fp_camera_2, secondaryCameraParams); + } + } + actionFinished(true); + } + + public void DisableSecondaryCamera(){ + if (agentManager.thirdPartyCameras.Count > 0) { + var secondaryCameraName = "SecondaryCamera"; + Camera fp_camera_2 = m_CharacterController.transform.Find(secondaryCameraName).GetComponent(); + fp_camera_2.gameObject.SetActive(false); + agentManager.thirdPartyCameras.Remove(fp_camera_2); + } + actionFinished(true); + } + + public void ToggleLensDistortion (bool state) { + toggleLensDistortion(state); + actionFinished(true); + } + + public void toggleLensDistortion (bool state) { + PostProcessVolume ppVolume = GameObject.Find("ppProfileSecondary").GetComponent(); + ppVolume.enabled = state; + + // // Keeping this here in case we ever decide unravel the secrets of this obnoxious post-processing instancing when you change anything about its settings + // LensDistortion lensDistortion = null; + // ppVolume.profile.TryGetSettings(out lensDistortion); + // lensDistortion.enabled = new BoolParameter { value = state }; + } + + public IEnumerator MoveAheadQuick( + float? moveMagnitude = null, + float noise = 0f, + bool forceAction = false, + float speed = 1, + bool returnToStart = true + ) { + bool quickMoveSuccess = MoveRelative( + z: 1.0f, + moveMagnitude: moveMagnitude, + noise: noise, + forceAction: forceAction + ); + Physics.SyncTransforms(); + + if (quickMoveSuccess){ + Debug.Log("Use quick MoveAhead"); + yield return new ActionFinished() {success = true, actionReturn = "Use quick MoveAhead"}; + } else { + Debug.Log("Use slow MoveAhead"); + yield return base.MoveAgent( + ahead: moveMagnitude.GetValueOrDefault(gridSize), + speed: speed, + returnToStart: returnToStart + ); + } + } + + public IEnumerator MoveBackQuick( + float? moveMagnitude = null, + float noise = 0f, + bool forceAction = false, + float speed = 1, + bool returnToStart = true + ) { + bool quickMoveSuccess = MoveRelative( + z: -1.0f, + moveMagnitude: moveMagnitude, + noise: noise, + forceAction: forceAction + ); + Physics.SyncTransforms(); + + if (quickMoveSuccess){ + Debug.Log("Use quick MoveBack"); + yield return new ActionFinished() {success = true, actionReturn = "Use quick MoveBack"}; + } else { + Debug.Log("Use slow MoveBack"); + yield return base.MoveAgent( + ahead: -moveMagnitude.GetValueOrDefault(gridSize), + speed: speed, + returnToStart: returnToStart + ); + } + } + + public IEnumerator RotateRightQuick( + float? degrees = null, + float noise = 0f, + float speed = 1.0f, + bool returnToStart = true + ) { + bool quickRotateSuccess = Rotate(rotation: new Vector3(0, degrees.GetValueOrDefault(rotateStepDegrees), 0), noise: noise); + Physics.SyncTransforms(); + if (quickRotateSuccess){ + Debug.Log("Use quick RotateRight"); + yield return new ActionFinished() {success = true, actionReturn = "Use quick RotateRight"}; + } else { + Debug.Log("Use slow RotateRight"); + yield return base.RotateAgent( + degrees: degrees.GetValueOrDefault(rotateStepDegrees), + speed: speed, + returnToStart: returnToStart + ); + } + } + + public IEnumerator RotateLeftQuick( + float? degrees = null, + float noise = 0f, + float speed = 1.0f, + bool returnToStart = true + ) { + bool quickRotateSuccess = Rotate(rotation: new Vector3(0, -degrees.GetValueOrDefault(rotateStepDegrees), 0), noise: noise); + Physics.SyncTransforms(); + if (quickRotateSuccess){ + Debug.Log("Use quick RotateLeft"); + yield return new ActionFinished() {success = true, actionReturn = "Use quick RotateLeft"}; + } else { + Debug.Log("Use slow RotateLeft"); + yield return base.RotateAgent( + degrees: -degrees.GetValueOrDefault(rotateStepDegrees), + speed: speed, + returnToStart: returnToStart + ); + } + } + + public bool MoveRelative( + float? moveMagnitude = null, + float x = 0f, + float z = 0f, + float noise = 0f, + bool forceAction = false + ) { + + if (!moveMagnitude.HasValue) { + moveMagnitude = gridSize; + } else if (moveMagnitude.Value <= 0f) { + throw new InvalidOperationException("moveMagnitude must be null or >= 0."); + } + + if (!allowHorizontalMovement && Math.Abs(x) > 0) { + throw new InvalidOperationException("Controller does not support horizontal movement. Set AllowHorizontalMovement to true on the Controller."); + } + + var moveLocal = new Vector3(x, 0, z); + float xzMag = moveLocal.magnitude; + if (xzMag > 1e-5f) { + // rotate a small amount with every movement since robot doesn't always move perfectly straight + if (this.applyActionNoise) { + var rotateNoise = (float)systemRandom.NextGaussian(rotateGaussianMu, rotateGaussianSigma / 2.0f); + transform.rotation = transform.rotation * Quaternion.Euler(new Vector3(0.0f, rotateNoise, 0.0f)); + Physics.SyncTransforms(); + } + + var moveLocalNorm = moveLocal / xzMag; + var magnitudeWithNoise = GetMoveMagnitudeWithNoise( + moveMagnitude: xzMag * moveMagnitude.Value, + noise: noise + ); + + Debug.Log("Move Direction:" + this.transform.rotation * (moveLocalNorm * magnitudeWithNoise)); + return base.moveInDirection( + direction: this.transform.rotation * (moveLocalNorm * magnitudeWithNoise), + forceAction: forceAction + ); + } else { + errorMessage = "either x or z must be != 0 for the MoveRelative action"; + return false; + } + } + + protected float GetMoveMagnitudeWithNoise(float moveMagnitude, float noise) { + float internalNoise = applyActionNoise ? (float)systemRandom.NextGaussian(movementGaussianMu, movementGaussianSigma) : 0; + return moveMagnitude + noise + (float)internalNoise; + } + + protected bool moveInDirection( + Vector3 direction, + string objectId = "", + float maxDistanceToObject = -1.0f, + bool forceAction = false, + bool manualInteract = false, + HashSet ignoreColliders = null + ) { + Vector3 targetPosition = transform.position + direction; + if (checkIfSceneBoundsContainTargetPosition(targetPosition) && + CheckIfItemBlocksAgentMovement(direction, forceAction) && // forceAction = true allows ignoring movement restrictions caused by held objects + CheckIfAgentCanMove(direction, ignoreColliders)) { + + // only default hand if not manually interacting with things + if (!manualInteract) { + DefaultAgentHand(); + } + + Vector3 oldPosition = transform.position; + transform.position = targetPosition; + this.snapAgentToGrid(); + + if (objectId != "" && maxDistanceToObject > 0.0f) { + if (!physicsSceneManager.ObjectIdToSimObjPhysics.ContainsKey(objectId)) { + errorMessage = "No object with ID " + objectId; + transform.position = oldPosition; + return false; + } + SimObjPhysics sop = physicsSceneManager.ObjectIdToSimObjPhysics[objectId]; + if (distanceToObject(sop) > maxDistanceToObject) { + errorMessage = "Agent movement would bring it beyond the max distance of " + objectId; + transform.position = oldPosition; + return false; + } + } + return true; + } else { + return false; + } + } + + public bool Rotate(Vector3 rotation, float noise, bool manualInteract = false) { + // only default hand if not manually Interacting with things + if (!manualInteract) { + DefaultAgentHand(); + } + + float rotateAmountDegrees = GetRotateMagnitudeWithNoise(rotation: rotation, noise: noise); + + // multiply quaternions to apply rotation based on rotateAmountDegrees + transform.rotation = ( + transform.rotation + * Quaternion.Euler(new Vector3(0.0f, rotateAmountDegrees, 0.0f)) + ); + Physics.SyncTransforms(); + if (base.isAgentCapsuleColliding()) { + transform.rotation = ( + transform.rotation + * Quaternion.Euler(new Vector3(0.0f, -rotateAmountDegrees, 0.0f)) + ); + Physics.SyncTransforms(); + return false; + } + return true; + } + + protected float GetRotateMagnitudeWithNoise(Vector3 rotation, float noise) { + float internalNoise = applyActionNoise ? (float)systemRandom.NextGaussian(rotateGaussianMu, rotateGaussianSigma) : 0; + return rotation.y + noise + (float)internalNoise; + } } } diff --git a/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing.meta b/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing.meta new file mode 100644 index 0000000000..0864624579 --- /dev/null +++ b/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d16678e744a24e9b96d3a3b94a28250 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing/Stretch_Go_Pro_Post_Profile.asset b/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing/Stretch_Go_Pro_Post_Profile.asset new file mode 100644 index 0000000000..47e77b37c6 --- /dev/null +++ b/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing/Stretch_Go_Pro_Post_Profile.asset @@ -0,0 +1,50 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3} + m_Name: Stretch_Go_Pro_Post_Profile + m_EditorClassIdentifier: + settings: + - {fileID: 5549341304100349974} +--- !u!114 &5549341304100349974 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b77c5407dc277943b591ade9e6b18c5, type: 3} + m_Name: LensDistortion + m_EditorClassIdentifier: + active: 1 + enabled: + overrideState: 1 + value: 1 + intensity: + overrideState: 1 + value: 50 + intensityX: + overrideState: 0 + value: 1 + intensityY: + overrideState: 0 + value: 1 + centerX: + overrideState: 0 + value: 0 + centerY: + overrideState: 0 + value: 0 + scale: + overrideState: 1 + value: 1.2 diff --git a/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing/Stretch_Go_Pro_Post_Profile.asset.meta b/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing/Stretch_Go_Pro_Post_Profile.asset.meta new file mode 100644 index 0000000000..60b5cb8df0 --- /dev/null +++ b/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/PostProcessing/Stretch_Go_Pro_Post_Profile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e502ae08dd22f49f58743d4aace40ba9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/Prefabs/FPSController.prefab b/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/Prefabs/FPSController.prefab index 3fd12acea2..dec3db44a0 100644 --- a/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/Prefabs/FPSController.prefab +++ b/unity/Assets/Standard Assets/Characters/FirstPersonCharacter/Prefabs/FPSController.prefab @@ -36,6 +36,7 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: + - {fileID: 8272246977847823937} - {fileID: 174536628478516476} - {fileID: 2816156536344430128} - {fileID: 400002} @@ -76,8 +77,8 @@ Rigidbody: m_GameObject: {fileID: 100000} serializedVersion: 2 m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 + m_Drag: 1 + m_AngularDrag: 1 m_UseGravity: 1 m_IsKinematic: 1 m_Interpolate: 0 @@ -165,10 +166,6 @@ MonoBehaviour: type: 3} DebugTargetPointPrefab: {fileID: 8489347496220810827, guid: e6c0a9a9ece944e328cad96dbba1d847, type: 3} - FixedCameraGimbalBase: {fileID: 0} - FixedCameraGimbalPrimary: {fileID: 0} - FixedCameraGimbalSecondary: {fileID: 0} - MotorCameraGimbals: {fileID: 0} VisibilityCapsule: {fileID: 1762015268591634} TallVisCap: {fileID: 256261900933697183} DroneVisCap: {fileID: 7970507070051039418} @@ -193,7 +190,6 @@ MonoBehaviour: - {fileID: 5816710041462207104, guid: 9215b98f2bb6741b8bafa00989578d49, type: 3} - {fileID: 6545476784750854561, guid: aca5ccb301c25451183fa2ae1deceeb9, type: 3} - {fileID: 5557411844810648702, guid: 45f2f0b0603de483e89ee8c61cb4cde0, type: 3} - UseMotorCameraGimbals: 0 GripperOpennessStates: - {fileID: 1713104984127404334} - {fileID: 7207461443272565169} @@ -265,7 +261,7 @@ GameObject: - component: {fileID: 992261166} - component: {fileID: 2007864991} - component: {fileID: 2007864990} - m_Layer: 10 + m_Layer: 19 m_Name: FirstPersonCharacter m_TagString: MainCamera m_Icon: {fileID: 0} @@ -287,7 +283,7 @@ Transform: - {fileID: 4781144330620476} - {fileID: 8450533553661686078} m_Father: {fileID: 400000} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!20 &2000000 Camera: @@ -591,8 +587,8 @@ Rigidbody: m_GameObject: {fileID: 1340499340313870} serializedVersion: 2 m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 + m_Drag: 1 + m_AngularDrag: 1 m_UseGravity: 0 m_IsKinematic: 1 m_Interpolate: 0 @@ -627,7 +623,7 @@ Transform: m_Children: - {fileID: 4097500997184042582} m_Father: {fileID: 400000} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1863262018947090 GameObject: @@ -934,7 +930,7 @@ Transform: m_Children: - {fileID: 256261899978608359} m_Father: {fileID: 400000} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &256261901358105704 GameObject: @@ -3411,7 +3407,7 @@ GameObject: - component: {fileID: 8665855102294462182} - component: {fileID: 9171690000068698567} - component: {fileID: 984864979314936556} - m_Layer: 10 + m_Layer: 19 m_Name: SecondaryCamera m_TagString: MainCamera m_Icon: {fileID: 0} @@ -3430,7 +3426,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 400000} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!20 &5227773624280101340 Camera: @@ -4138,6 +4134,150 @@ CapsuleCollider: m_Height: 0.4918236 m_Direction: 1 m_Center: {x: -0.042353824, y: -0.0000000025245042, z: 0.03793583} +--- !u!1 &2904510367131896280 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 122792067977413108} + - component: {fileID: 2975675021090562017} + - component: {fileID: 1289748403460143811} + - component: {fileID: 5690776724103063287} + m_Layer: 20 + m_Name: GoProCamera_1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &122792067977413108 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2904510367131896280} + m_LocalRotation: {x: 0.17364816, y: 0, z: 0, w: 0.9848078} + m_LocalPosition: {x: -1.299001, y: 0.5560812, z: 0.02734984} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8272246977847823937} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 20, y: 0, z: 0} +--- !u!20 &2975675021090562017 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2904510367131896280} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 20 + field of view: 69 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 7 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &1289748403460143811 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2904510367131896280} + m_Enabled: 1 +--- !u!114 &5690776724103063287 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2904510367131896280} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} + m_Name: + m_EditorClassIdentifier: + volumeTrigger: {fileID: 9148334614227625881} + volumeLayer: + serializedVersion: 2 + m_Bits: 1048576 + stopNaNPropagation: 1 + finalBlitToCameraTarget: 0 + antialiasingMode: 0 + temporalAntialiasing: + jitterSpread: 0.75 + sharpness: 0.25 + stationaryBlending: 0.95 + motionBlending: 0.85 + subpixelMorphologicalAntialiasing: + quality: 2 + fastApproximateAntialiasing: + fastMode: 0 + keepAlpha: 0 + fog: + enabled: 1 + excludeSkybox: 1 + debugLayer: + lightMeter: + width: 512 + height: 256 + showCurves: 1 + histogram: + width: 512 + height: 256 + channel: 3 + waveform: + exposure: 0.12 + height: 256 + vectorscope: + size: 256 + exposure: 0.12 + overlaySettings: + linearDepth: 0 + motionColorIntensity: 4 + motionGridSize: 64 + colorBlindnessType: 0 + colorBlindnessStrength: 1 + m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} + m_ShowToolkit: 0 + m_ShowCustomSorter: 0 + breakBeforeColorGrading: 0 + m_BeforeTransparentBundles: [] + m_BeforeStackBundles: [] + m_AfterStackBundles: [] --- !u!1 &3110460435476242101 GameObject: m_ObjectHideFlags: 0 @@ -5040,6 +5180,150 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 0.01827766, y: 0.051970433, z: 0.018453967} m_Center: {x: 0.002958568, y: 0, z: -0.0041715316} +--- !u!1 &3748484086605755534 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7835259401011730262} + - component: {fileID: 1589852228611927845} + - component: {fileID: 4360070008494642931} + - component: {fileID: 6952778794436808596} + m_Layer: 20 + m_Name: GoProCamera_3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7835259401011730262 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3748484086605755534} + m_LocalRotation: {x: 0.086824074, y: -0.8528686, z: 0.15038373, w: 0.49240384} + m_LocalPosition: {x: -0.1675288, y: 0.5560812, z: -0.03782497} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8272246977847823937} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 20, y: -120, z: 0} +--- !u!20 &1589852228611927845 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3748484086605755534} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 20 + field of view: 69 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 7 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &4360070008494642931 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3748484086605755534} + m_Enabled: 1 +--- !u!114 &6952778794436808596 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3748484086605755534} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} + m_Name: + m_EditorClassIdentifier: + volumeTrigger: {fileID: 9148334614227625881} + volumeLayer: + serializedVersion: 2 + m_Bits: 1048576 + stopNaNPropagation: 1 + finalBlitToCameraTarget: 0 + antialiasingMode: 0 + temporalAntialiasing: + jitterSpread: 0.75 + sharpness: 0.25 + stationaryBlending: 0.95 + motionBlending: 0.85 + subpixelMorphologicalAntialiasing: + quality: 2 + fastApproximateAntialiasing: + fastMode: 0 + keepAlpha: 0 + fog: + enabled: 1 + excludeSkybox: 1 + debugLayer: + lightMeter: + width: 512 + height: 256 + showCurves: 1 + histogram: + width: 512 + height: 256 + channel: 3 + waveform: + exposure: 0.12 + height: 256 + vectorscope: + size: 256 + exposure: 0.12 + overlaySettings: + linearDepth: 0 + motionColorIntensity: 4 + motionGridSize: 64 + colorBlindnessType: 0 + colorBlindnessStrength: 1 + m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} + m_ShowToolkit: 0 + m_ShowCustomSorter: 0 + breakBeforeColorGrading: 0 + m_BeforeTransparentBundles: [] + m_BeforeStackBundles: [] + m_AfterStackBundles: [] --- !u!1 &3871341263158127331 GameObject: m_ObjectHideFlags: 0 @@ -7541,7 +7825,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 400000} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!195 &2586041009324999210 NavMeshAgent: @@ -7806,7 +8090,7 @@ Transform: - {fileID: 4898932101598050487} - {fileID: 4898869815416102725} m_Father: {fileID: 400000} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: -180.00002, z: 0} --- !u!1 &4893948769541243777 GameObject: @@ -8293,7 +8577,7 @@ Transform: - {fileID: 6055499585400109725} - {fileID: 8504077835467257009} m_Father: {fileID: 400000} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &5434464658380458740 GameObject: @@ -8466,6 +8750,150 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 0.07489617, y: 0.056409508, z: 0.026408188} m_Center: {x: 0.00052678585, y: 0, z: 0.00011564652} +--- !u!1 &5640078015911616775 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9148334614227625881} + - component: {fileID: 8466025545469486097} + - component: {fileID: 2664240260287134991} + - component: {fileID: 4160379257861799470} + m_Layer: 20 + m_Name: GoProCamera_4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &9148334614227625881 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5640078015911616775} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: -0.1376, y: 0.4340732, z: 0.006196275} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8272246977847823937} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!20 &8466025545469486097 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5640078015911616775} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 20 + field of view: 69 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 7 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &2664240260287134991 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5640078015911616775} + m_Enabled: 1 +--- !u!114 &4160379257861799470 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5640078015911616775} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} + m_Name: + m_EditorClassIdentifier: + volumeTrigger: {fileID: 9148334614227625881} + volumeLayer: + serializedVersion: 2 + m_Bits: 1048576 + stopNaNPropagation: 1 + finalBlitToCameraTarget: 0 + antialiasingMode: 0 + temporalAntialiasing: + jitterSpread: 0.75 + sharpness: 0.25 + stationaryBlending: 0.95 + motionBlending: 0.85 + subpixelMorphologicalAntialiasing: + quality: 2 + fastApproximateAntialiasing: + fastMode: 0 + keepAlpha: 0 + fog: + enabled: 1 + excludeSkybox: 1 + debugLayer: + lightMeter: + width: 512 + height: 256 + showCurves: 1 + histogram: + width: 512 + height: 256 + channel: 3 + waveform: + exposure: 0.12 + height: 256 + vectorscope: + size: 256 + exposure: 0.12 + overlaySettings: + linearDepth: 0 + motionColorIntensity: 4 + motionGridSize: 64 + colorBlindnessType: 0 + colorBlindnessStrength: 1 + m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} + m_ShowToolkit: 0 + m_ShowCustomSorter: 0 + breakBeforeColorGrading: 0 + m_BeforeTransparentBundles: [] + m_BeforeStackBundles: [] + m_AfterStackBundles: [] --- !u!1 &5645059617323169218 GameObject: m_ObjectHideFlags: 0 @@ -9129,6 +9557,150 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 0.02784874, y: 0.0062788753, z: 0.011457822} m_Center: {x: 0, y: -0.0012031817, z: 0.0032054354} +--- !u!1 &6237344995347550498 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7667653080163150880} + - component: {fileID: 5956350600518543206} + - component: {fileID: 584399486636766707} + - component: {fileID: 323996298024528788} + m_Layer: 20 + m_Name: GoProCamera_2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7667653080163150880 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6237344995347550498} + m_LocalRotation: {x: 0.12940954, y: 0.8365163, z: -0.22414392, w: 0.48296285} + m_LocalPosition: {x: 0.04, y: 0.5560812, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8272246977847823937} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 30, y: 120, z: 0} +--- !u!20 &5956350600518543206 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6237344995347550498} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 20 + field of view: 69 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 7 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &584399486636766707 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6237344995347550498} + m_Enabled: 1 +--- !u!114 &323996298024528788 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6237344995347550498} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} + m_Name: + m_EditorClassIdentifier: + volumeTrigger: {fileID: 9148334614227625881} + volumeLayer: + serializedVersion: 2 + m_Bits: 1048576 + stopNaNPropagation: 1 + finalBlitToCameraTarget: 0 + antialiasingMode: 0 + temporalAntialiasing: + jitterSpread: 0.75 + sharpness: 0.25 + stationaryBlending: 0.95 + motionBlending: 0.85 + subpixelMorphologicalAntialiasing: + quality: 2 + fastApproximateAntialiasing: + fastMode: 0 + keepAlpha: 0 + fog: + enabled: 1 + excludeSkybox: 1 + debugLayer: + lightMeter: + width: 512 + height: 256 + showCurves: 1 + histogram: + width: 512 + height: 256 + channel: 3 + waveform: + exposure: 0.12 + height: 256 + vectorscope: + size: 256 + exposure: 0.12 + overlaySettings: + linearDepth: 0 + motionColorIntensity: 4 + motionGridSize: 64 + colorBlindnessType: 0 + colorBlindnessStrength: 1 + m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} + m_ShowToolkit: 0 + m_ShowCustomSorter: 0 + breakBeforeColorGrading: 0 + m_BeforeTransparentBundles: [] + m_BeforeStackBundles: [] + m_AfterStackBundles: [] --- !u!1 &6321176063154157537 GameObject: m_ObjectHideFlags: 0 @@ -10441,6 +11013,40 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &7676276976098695213 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8272246977847823937} + m_Layer: 20 + m_Name: GoProCameras + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &8272246977847823937 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7676276976098695213} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 122792067977413108} + - {fileID: 7667653080163150880} + - {fileID: 7835259401011730262} + - {fileID: 9148334614227625881} + m_Father: {fileID: 400000} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &7748810745245236562 GameObject: m_ObjectHideFlags: 0 @@ -10604,7 +11210,7 @@ Transform: - {fileID: 1813055551114628073} - {fileID: 1813055551114628075} m_Father: {fileID: 400000} - m_RootOrder: 7 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &8066813359769731564 GameObject: @@ -12211,7 +12817,7 @@ PrefabInstance: - target: {fileID: 6327193546668083826, guid: 6d6864c30f4f772439f94c8f5aff1ac7, type: 3} propertyPath: m_RootOrder - value: 8 + value: 9 objectReference: {fileID: 0} - target: {fileID: 6327193546668083826, guid: 6d6864c30f4f772439f94c8f5aff1ac7, type: 3} @@ -12470,21 +13076,15 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 6d6864c30f4f772439f94c8f5aff1ac7, type: 3} ---- !u!1 &6541060884949338445 stripped +--- !u!1 &4523525810192944689 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 6666846618789859528, guid: 6d6864c30f4f772439f94c8f5aff1ac7, - type: 3} - m_PrefabInstance: {fileID: 451452419367262597} - m_PrefabAsset: {fileID: 0} ---- !u!4 &5876446086090707959 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 6327193546668083826, guid: 6d6864c30f4f772439f94c8f5aff1ac7, + m_CorrespondingSourceObject: {fileID: 4072709080383018932, guid: 6d6864c30f4f772439f94c8f5aff1ac7, type: 3} m_PrefabInstance: {fileID: 451452419367262597} m_PrefabAsset: {fileID: 0} ---- !u!1 &4171911330349218397 stripped +--- !u!1 &4434878276163363485 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 4586488326550463448, guid: 6d6864c30f4f772439f94c8f5aff1ac7, + m_CorrespondingSourceObject: {fileID: 4307758872303516440, guid: 6d6864c30f4f772439f94c8f5aff1ac7, type: 3} m_PrefabInstance: {fileID: 451452419367262597} m_PrefabAsset: {fileID: 0} @@ -12494,27 +13094,33 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 451452419367262597} m_PrefabAsset: {fileID: 0} ---- !u!1 &1160585668738145964 stripped +--- !u!1 &5629764884494018591 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 1610277733482071849, guid: 6d6864c30f4f772439f94c8f5aff1ac7, + m_CorrespondingSourceObject: {fileID: 5216031213673492890, guid: 6d6864c30f4f772439f94c8f5aff1ac7, type: 3} m_PrefabInstance: {fileID: 451452419367262597} m_PrefabAsset: {fileID: 0} ---- !u!1 &4523525810192944689 stripped +--- !u!1 &4171911330349218397 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 4072709080383018932, guid: 6d6864c30f4f772439f94c8f5aff1ac7, + m_CorrespondingSourceObject: {fileID: 4586488326550463448, guid: 6d6864c30f4f772439f94c8f5aff1ac7, type: 3} m_PrefabInstance: {fileID: 451452419367262597} m_PrefabAsset: {fileID: 0} ---- !u!1 &4434878276163363485 stripped +--- !u!4 &5876446086090707959 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6327193546668083826, guid: 6d6864c30f4f772439f94c8f5aff1ac7, + type: 3} + m_PrefabInstance: {fileID: 451452419367262597} + m_PrefabAsset: {fileID: 0} +--- !u!1 &6541060884949338445 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 4307758872303516440, guid: 6d6864c30f4f772439f94c8f5aff1ac7, + m_CorrespondingSourceObject: {fileID: 6666846618789859528, guid: 6d6864c30f4f772439f94c8f5aff1ac7, type: 3} m_PrefabInstance: {fileID: 451452419367262597} m_PrefabAsset: {fileID: 0} ---- !u!1 &5629764884494018591 stripped +--- !u!1 &1160585668738145964 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 5216031213673492890, guid: 6d6864c30f4f772439f94c8f5aff1ac7, + m_CorrespondingSourceObject: {fileID: 1610277733482071849, guid: 6d6864c30f4f772439f94c8f5aff1ac7, type: 3} m_PrefabInstance: {fileID: 451452419367262597} m_PrefabAsset: {fileID: 0} @@ -12688,7 +13294,7 @@ PrefabInstance: - target: {fileID: 122036717755888525, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} propertyPath: m_RootOrder - value: 9 + value: 10 objectReference: {fileID: 0} - target: {fileID: 122036717755888525, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} @@ -12872,33 +13478,33 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} ---- !u!4 &6736801866581176760 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 122036717755888525, guid: 90f8e05439e435c408ec2fe2048c8492, +--- !u!1 &983767856714463903 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5866898946652059818, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!1 &1713104984127404334 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 5407215448795904795, guid: 90f8e05439e435c408ec2fe2048c8492, +--- !u!4 &983767856714463896 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 5866898946652059821, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!1 &7207461443272565169 stripped +--- !u!1 &6299647482959421952 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 4092199603862201220, guid: 90f8e05439e435c408ec2fe2048c8492, + m_CorrespondingSourceObject: {fileID: 837874209359945781, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!1 &6851921729434894571 stripped +--- !u!1 &2731223673477288560 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 277684581352194782, guid: 90f8e05439e435c408ec2fe2048c8492, + m_CorrespondingSourceObject: {fileID: 8731111131565183045, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!1 &2454489429463948272 stripped +--- !u!1 &26195801637813627 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 9141316605001652677, guid: 90f8e05439e435c408ec2fe2048c8492, + m_CorrespondingSourceObject: {fileID: 6670238778300104526, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} @@ -12908,39 +13514,39 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!1 &26195801637813627 stripped +--- !u!1 &2454489429463948272 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 6670238778300104526, guid: 90f8e05439e435c408ec2fe2048c8492, + m_CorrespondingSourceObject: {fileID: 9141316605001652677, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!1 &2731223673477288560 stripped +--- !u!1 &6851921729434894571 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 8731111131565183045, guid: 90f8e05439e435c408ec2fe2048c8492, + m_CorrespondingSourceObject: {fileID: 277684581352194782, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!1 &6299647482959421952 stripped +--- !u!1 &7207461443272565169 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 837874209359945781, guid: 90f8e05439e435c408ec2fe2048c8492, + m_CorrespondingSourceObject: {fileID: 4092199603862201220, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!4 &469239578794652674 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 6507544009663936055, guid: 90f8e05439e435c408ec2fe2048c8492, +--- !u!1 &1713104984127404334 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5407215448795904795, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!1 &983767856714463903 stripped +--- !u!1 &174928036260264604 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 5866898946652059818, guid: 90f8e05439e435c408ec2fe2048c8492, + m_CorrespondingSourceObject: {fileID: 6818760147463714985, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!1 &174928036260264604 stripped +--- !u!1 &4276028204970308005 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 6818760147463714985, guid: 90f8e05439e435c408ec2fe2048c8492, + m_CorrespondingSourceObject: {fileID: 7465810235214066576, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} @@ -12974,21 +13580,21 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} +--- !u!4 &6736801866581176760 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 122036717755888525, guid: 90f8e05439e435c408ec2fe2048c8492, + type: 3} + m_PrefabInstance: {fileID: 6686827459010527797} + m_PrefabAsset: {fileID: 0} --- !u!1 &4091808238110504036 stripped GameObject: m_CorrespondingSourceObject: {fileID: 7207280906714838609, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} ---- !u!4 &983767856714463896 stripped +--- !u!4 &469239578794652674 stripped Transform: - m_CorrespondingSourceObject: {fileID: 5866898946652059821, guid: 90f8e05439e435c408ec2fe2048c8492, - type: 3} - m_PrefabInstance: {fileID: 6686827459010527797} - m_PrefabAsset: {fileID: 0} ---- !u!1 &4276028204970308005 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 7465810235214066576, guid: 90f8e05439e435c408ec2fe2048c8492, + m_CorrespondingSourceObject: {fileID: 6507544009663936055, guid: 90f8e05439e435c408ec2fe2048c8492, type: 3} m_PrefabInstance: {fileID: 6686827459010527797} m_PrefabAsset: {fileID: 0} diff --git a/unity/Assets/UnitTests/Procedural/Movement.meta b/unity/Assets/UnitTests/Procedural/Movement.meta new file mode 100644 index 0000000000..91436ad84a --- /dev/null +++ b/unity/Assets/UnitTests/Procedural/Movement.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: db8a117f9280d41478b5fc79d7641abe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/ProjectSettings/TagManager.asset b/unity/ProjectSettings/TagManager.asset index af9633e6d2..1737da8efe 100644 --- a/unity/ProjectSettings/TagManager.asset +++ b/unity/ProjectSettings/TagManager.asset @@ -39,8 +39,8 @@ TagManager: - Procedural3 - FloorAgent - ArticulatedAgent - - - - + - PrimaryPPProfile + - SecondaryPPProfile - - -