turrets now aiming as they should

This commit is contained in:
Tleety
2014-06-05 06:53:34 +02:00
parent 4d5c4c8fc7
commit b4cec1747e
+6 -3
View File
@@ -688,9 +688,11 @@ void GameWorld::CreateGate(EntityID parent, glm::vec3 position, glm::quat orient
EntityID GameWorld::CreateTower(EntityID parent, glm::vec3 pos, int teamID)
{
auto towerBase = CreateEntity(parent);
auto parentTransform = GetComponent<Components::Transform>(parent);
auto towerBase = CreateEntity();
auto transform = AddComponent<Components::Transform>(towerBase);
transform->Position = pos;
transform->Position = parentTransform->Orientation * pos;
auto towerComponent = AddComponent<Components::Tower>(towerBase);
@@ -1408,7 +1410,8 @@ void GameWorld::CreateBase(glm::quat orientation, int teamID)
CreateTower(base, glm::vec3(273.01227f, 40.30102f, -62.82098f), teamID);
CreateTower(base, glm::vec3(357.36978f, 40.43885f, -62.82098f), teamID);
CreateTower(base, glm::vec3(357.36978f, 40.43885f, 32.99123f), teamID);
CreateTower(base, glm::vec3(119.64996f, 28.90156f, 16.63123f), teamID);
CreateTower(base, glm::vec3(119.64996f, 28.90156f, -16.63123f), teamID);
CreateTower(base, glm::vec3(119.05541f, 29.54314f, 18.33529f), teamID);
CreateGarage(base, glm::vec3(323.2f, 41.4f, -10.2f), glm::quat(glm::vec3(0, glm::pi<float>() / 2.f, 0)), teamID);