Skip to content

Commit

Permalink
Running the formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucaweihs committed Jul 31, 2024
1 parent 5974f8d commit a41dc5c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions unity/Assets/Scripts/BaseFPSAgentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
23 changes: 12 additions & 11 deletions unity/Assets/Scripts/PhysicsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ public static IEnumerable<Collider> OverlapConvex(
queryTriggerInteraction
);


// Check each candidate collider for actual collision
foreach (Collider candidateCollider in candidateColliders) {
if (candidateCollider == meshCollider) {
Expand All @@ -484,17 +483,19 @@ public static IEnumerable<Collider> 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;
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion unity/Assets/Scripts/Stretch_Robot_Arm_Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ void Start() {
solver = this.gameObject.GetComponentInChildren<Stretch_Arm_Solver>();

//call SetGripperOpenness logic in StretchAgentController here
((StretchAgentController)PhysicsController).setGripperOpenness(openness: null, openState: 1);
((StretchAgentController)PhysicsController).setGripperOpenness(
openness: null,
openState: 1
);
}

public void resetPosRotManipulator() {
Expand Down

0 comments on commit a41dc5c

Please sign in to comment.