A gray tank! :D

This commit is contained in:
2014-04-05 01:24:19 +02:00
parent ed29297d00
commit ad2862bf84
15 changed files with 289 additions and 18 deletions
+15 -1
View File
@@ -45,4 +45,18 @@ glm::quat Systems::TransformSystem::AbsoluteOrientation(EntityID entity)
} while (entity != 0);
return absOrientation;
}
}
glm::vec3 Systems::TransformSystem::AbsoluteScale(EntityID entity)
{
glm::vec3 absScale(1);
do
{
auto transform = m_World->GetComponent<Components::Transform>(entity, "Transform");
absScale *= transform->Scale;
entity = m_World->GetEntityParent(entity);
} while (entity != 0);
return absScale;
}