Implemented a custom physics engine #316
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue