diff --git a/Assets/Scenes/PhysicsSandbox.shade b/Assets/Scenes/PhysicsSandbox.shade index f93d0cc8..731df7ce 100644 --- a/Assets/Scenes/PhysicsSandbox.shade +++ b/Assets/Scenes/PhysicsSandbox.shade @@ -66,7 +66,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -2.24715948, y: 6.47200441, z: 0} + Translate: {x: -1.98839664, y: 7.7662077, z: 0} Rotate: {x: -0, y: 0, z: -0} Scale: {x: 1, y: 1, z: 1} IsActive: true diff --git a/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsConvex.cpp b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsConvex.cpp index d7813d85..314e3ff9 100644 --- a/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsConvex.cpp +++ b/SHADE_Engine/src/Physics/Collision/Narrowphase/SHSphereVsConvex.cpp @@ -102,7 +102,7 @@ namespace SHADE // Check if center is inside polyhedron (below the face) if (bestDistance < SHMath::EPSILON) { - manifold.normal = CONVEX.GetNormal(closestFaceIndex); + manifold.normal = -CONVEX.GetNormal(closestFaceIndex); SHContact newContact; newContact.penetration = PENETRATION; @@ -179,7 +179,7 @@ namespace SHADE if (projection >= 0.0f) { // Sphere Within region - manifold.normal = CP_TO_CENTER; + manifold.normal = -CP_TO_CENTER; SHContact newContact; newContact.penetration = RADIUS - projection;