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