Made CollisionSystem aware of entities

This commit is contained in:
2016-01-27 15:42:50 +01:00
parent 181017313d
commit 788407b709
7 changed files with 22 additions and 56 deletions
+8 -8
View File
@@ -80,14 +80,14 @@ void PlayerMovementSystem::Update(double dt)
velocity.y += 4.f;
}
//if (player.HasComponent("AABB")) {
// glm::vec3& size = player["AABB"]["Size"];
// if (controller->Crouching()) {
// size = glm::vec3(1.f, 1.f, 1.f);
// } else {
// size = glm::vec3(1.f, 1.6f, 1.f);
// }
//}
if (player.HasComponent("AABB")) {
glm::vec3& size = player["AABB"]["Size"];
if (controller->Crouching()) {
size = glm::vec3(1.f, 1.f, 1.f);
} else {
size = glm::vec3(1.f, 1.6f, 1.f);
}
}
// Animations
EntityWrapper playerModel = player.FirstChildByName("PlayerModel");