diff --git a/assets b/assets index c44c64d..8ab7df0 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit c44c64df2b51139aaf4d0ba70c84ed4db868ef9f +Subproject commit 8ab7df0d7fdb3bd0a1355192670c28826a860bb1 diff --git a/src/GameWorld.cpp b/src/GameWorld.cpp index 85166b1..3d4c205 100755 --- a/src/GameWorld.cpp +++ b/src/GameWorld.cpp @@ -673,9 +673,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(parent); + + auto towerBase = CreateEntity(); auto transform = AddComponent(towerBase); - transform->Position = pos; + transform->Position = parentTransform->Orientation * pos; auto towerComponent = AddComponent(towerBase); @@ -1415,7 +1417,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() / 2.f, 0)), teamID);