From e6987d26642f841e575c0a99b5e6473c7fd46edc Mon Sep 17 00:00:00 2001 From: Dean Brettle Date: Sun, 20 Oct 2024 06:31:06 -0700 Subject: [PATCH] Fix bug where the wrong y coord was used for one corner of the box drawn to represent a box-plane collision. (#6677) * Fix bug where the wrong y coord was used for one corner of the box drawn to represent a box-plane collision. * Add changelog entry. --- docs/reference/changelog-r2024.md | 1 + src/webots/app/WbContactPointsRepresentation.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/reference/changelog-r2024.md b/docs/reference/changelog-r2024.md index 16c867eb9bc..766d77df589 100644 --- a/docs/reference/changelog-r2024.md +++ b/docs/reference/changelog-r2024.md @@ -29,3 +29,4 @@ Released on December **th, 2023. - Fixed crash on macos when closing Webots under some circumstances ([#6635](https://github.com/cyberbotics/webots/pull/6635)). - Fixed error on macos when when putting displays and cameras in separate windows ([#6635](https://github.com/cyberbotics/webots/pull/6635)). - Fixed crash when `wb_supervisor_field_get_name` was called with NULL ([#6647](https://github.com/cyberbotics/webots/pull/6647)). + - Fixed bug where the wrong y coordinate was used for one corner of the box drawn to represent a box-plane collision ([#6677](https://github.com/cyberbotics/webots/pull/6677)). diff --git a/src/webots/app/WbContactPointsRepresentation.cpp b/src/webots/app/WbContactPointsRepresentation.cpp index 4f9ca561646..55111dfcb84 100644 --- a/src/webots/app/WbContactPointsRepresentation.cpp +++ b/src/webots/app/WbContactPointsRepresentation.cpp @@ -184,9 +184,9 @@ void WbContactPointsRepresentation::updateRendering() { odeContacts[cg0 + 3].contactGeom().pos[2]); addVertex(mContactMesh, index++, odeContacts[cg0 + 3].contactGeom().pos[0], odeContacts[cg0 + 3].contactGeom().pos[1], odeContacts[cg0 + 3].contactGeom().pos[2]); - addVertex(mContactMesh, index++, odeContacts[cg0 + 2].contactGeom().pos[0], odeContacts[cg0 + 1].contactGeom().pos[1], + addVertex(mContactMesh, index++, odeContacts[cg0 + 2].contactGeom().pos[0], odeContacts[cg0 + 2].contactGeom().pos[1], odeContacts[cg0 + 2].contactGeom().pos[2]); - addVertex(mContactMesh, index++, odeContacts[cg0 + 2].contactGeom().pos[0], odeContacts[cg0 + 1].contactGeom().pos[1], + addVertex(mContactMesh, index++, odeContacts[cg0 + 2].contactGeom().pos[0], odeContacts[cg0 + 2].contactGeom().pos[1], odeContacts[cg0 + 2].contactGeom().pos[2]); addVertex(mContactMesh, index++, odeContacts[cg0].contactGeom().pos[0], odeContacts[cg0].contactGeom().pos[1], odeContacts[cg0].contactGeom().pos[2]);