This commit is contained in:
ViktorLjung
2014-05-26 01:03:25 +02:00
parent dff888f82d
commit 9a984dbb10
7 changed files with 142 additions and 50 deletions
+7 -5
View File
@@ -120,8 +120,9 @@ bool Systems::TankSteeringSystem::OnCollision( const Events::Collision &e )
transformHit->Position = transform->Position;
auto physics = m_World->AddComponent<Components::Physics>(hitSphere);
physics->Static = false;
physics->Phantom = true;
physics->Static = true;
physics->Phantom = false;
physics->CollisionLayer = 4;
{
auto shape = m_World->CreateEntity(hitSphere);
@@ -132,7 +133,7 @@ bool Systems::TankSteeringSystem::OnCollision( const Events::Collision &e )
}
m_World->CommitEntity(hitSphere);
}
m_World->RemoveEntity(e.Entity1);
}
@@ -153,8 +154,9 @@ bool Systems::TankSteeringSystem::OnCollision( const Events::Collision &e )
transformHit->Position = transform->Position;
auto physics = m_World->AddComponent<Components::Physics>(hitSphere);
physics->Static = false;
physics->Phantom = true;
physics->Static = true;
physics->Phantom = false;
physics->CollisionLayer = 4;
{
auto shape = m_World->CreateEntity(hitSphere);