Skip to content
Snippets Groups Projects
Commit 9694586e authored by mohitTyagi's avatar mohitTyagi Committed by Alexis Girault
Browse files

BUG: Fix direction in UnidirectionalPlaneToSphereCD

parent 9fc14e1f
No related branches found
No related tags found
No related merge requests found
......@@ -57,11 +57,8 @@ UnidirectionalPlaneToSphereCD::computeCollisionData()
Vec3d planeAColPt = sphereBPos - n*d;
Vec3d sphereBColPt = sphereBPos - n*r;
// Compute the direction from plane to sphere
Vec3d dirAtoB = (d > 0.0 ? 1.0 : -1.0)*n;
// Set collisionData
m_colData.PDColData.push_back({planeAColPt, sphereBColPt, dirAtoB, penetrationDepth});
m_colData.PDColData.push_back({planeAColPt, sphereBColPt, n, penetrationDepth});
}
} //iMSTK
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment