Fixed absolute position not taking scale into account

This commit is contained in:
2016-01-17 06:23:13 +01:00
parent 6ec2258758
commit e2357b8625
+1 -1
View File
@@ -7,7 +7,7 @@ glm::vec3 Transform::AbsolutePosition(World* world, EntityID entity)
while (entity != EntityID_Invalid) {
ComponentWrapper transform = world->GetComponent(entity, "Transform");
EntityID parent = world->GetParent(entity);
position += Transform::AbsoluteOrientation(world, parent) * (glm::vec3)transform["Position"];
position += Transform::AbsoluteScale(world, parent) * Transform::AbsoluteOrientation(world, parent) * (glm::vec3)transform["Position"];
entity = parent;
}