Implemented a custom physics engine #316

Merged
direnbharwani merged 95 commits from SHPhysics into main 2023-01-23 15:55:45 +08:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit bf8a410fa2 - Show all commits

View File

@ -59,12 +59,11 @@ namespace SHADE
case SHCollisionShape::Type::SPHERE: case SHCollisionShape::Type::SPHERE:
{ {
SHSphereCollisionShape* sphere = spheres.find(shape->id)->second; SHSphereCollisionShape* sphere = spheres.find(shape->id)->second;
spheres.erase(shape->id);
delete sphere; delete sphere;
sphere = nullptr; sphere = nullptr;
spheres.erase(shape->id);
break; break;
} }
case SHCollisionShape::Type::CAPSULE: case SHCollisionShape::Type::CAPSULE:

View File

@ -237,8 +237,8 @@ namespace YAML
switch (colliderType) switch (colliderType)
{ {
case SHCollisionShape::Type::BOX: break;
case SHCollisionShape::Type::SPHERE: collider->AddSphereCollisionShape(1.0f); break; case SHCollisionShape::Type::SPHERE: collider->AddSphereCollisionShape(1.0f); break;
case SHCollisionShape::Type::BOX: break;
case SHCollisionShape::Type::CAPSULE: break; case SHCollisionShape::Type::CAPSULE: break;
default:; default:;
} }