From a41dc5c422e5edcd7791587dc8e5b6f9ecd7fcd5 Mon Sep 17 00:00:00 2001 From: lucaw Date: Wed, 31 Jul 2024 08:32:15 -0700 Subject: [PATCH] Running the formatter. --- .../Assets/Scripts/BaseFPSAgentController.cs | 4 ++-- unity/Assets/Scripts/PhysicsExtensions.cs | 23 ++++++++++--------- .../Scripts/Stretch_Robot_Arm_Controller.cs | 5 +++- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/unity/Assets/Scripts/BaseFPSAgentController.cs b/unity/Assets/Scripts/BaseFPSAgentController.cs index be0d970ea6..ad18533841 100644 --- a/unity/Assets/Scripts/BaseFPSAgentController.cs +++ b/unity/Assets/Scripts/BaseFPSAgentController.cs @@ -3807,9 +3807,9 @@ public void FirstColliderObjectCollidingWith(string objectId) { collidingWithId = collidingWith.gameObject.name; } } - #if UNITY_EDITOR +#if UNITY_EDITOR Debug.Log(collidingWithId); - #endif +#endif actionFinishedEmit(true, actionReturn: collidingWithId); } diff --git a/unity/Assets/Scripts/PhysicsExtensions.cs b/unity/Assets/Scripts/PhysicsExtensions.cs index 72a6e62b58..fb70fd91e8 100644 --- a/unity/Assets/Scripts/PhysicsExtensions.cs +++ b/unity/Assets/Scripts/PhysicsExtensions.cs @@ -469,7 +469,6 @@ public static IEnumerable OverlapConvex( queryTriggerInteraction ); - // Check each candidate collider for actual collision foreach (Collider candidateCollider in candidateColliders) { if (candidateCollider == meshCollider) { @@ -484,17 +483,19 @@ public static IEnumerable OverlapConvex( float distance; // Use ComputePenetration to check for actual collision - if (Physics.ComputePenetration( - meshCollider, - meshCollider.transform.position, - meshCollider.transform.rotation, - candidateCollider, - candidateCollider.transform.position, - candidateCollider.transform.rotation, - out direction, - out distance) + if ( + Physics.ComputePenetration( + meshCollider, + meshCollider.transform.position, + meshCollider.transform.rotation, + candidateCollider, + candidateCollider.transform.position, + candidateCollider.transform.rotation, + out direction, + out distance + ) ) { - yield return candidateCollider; + yield return candidateCollider; } } } diff --git a/unity/Assets/Scripts/Stretch_Robot_Arm_Controller.cs b/unity/Assets/Scripts/Stretch_Robot_Arm_Controller.cs index 453d593746..b8d325dcdb 100644 --- a/unity/Assets/Scripts/Stretch_Robot_Arm_Controller.cs +++ b/unity/Assets/Scripts/Stretch_Robot_Arm_Controller.cs @@ -145,7 +145,10 @@ void Start() { solver = this.gameObject.GetComponentInChildren(); //call SetGripperOpenness logic in StretchAgentController here - ((StretchAgentController)PhysicsController).setGripperOpenness(openness: null, openState: 1); + ((StretchAgentController)PhysicsController).setGripperOpenness( + openness: null, + openState: 1 + ); } public void resetPosRotManipulator() {