fixup! Fixed relative transform rotations (For real this time?)
This commit is contained in:
@@ -24,10 +24,10 @@ glm::vec3 Systems::TransformSystem::AbsolutePosition(EntityID entity)
|
|||||||
//absPosition += transform->Position;
|
//absPosition += transform->Position;
|
||||||
entity = m_World->GetEntityParent(entity);
|
entity = m_World->GetEntityParent(entity);
|
||||||
auto transform2 = m_World->GetComponent<Components::Transform>(entity, "Transform");
|
auto transform2 = m_World->GetComponent<Components::Transform>(entity, "Transform");
|
||||||
if (entity != 0)
|
if (entity == 0)
|
||||||
absPosition += transform2->Orientation * transform->Position;
|
|
||||||
else
|
|
||||||
absPosition += transform->Position;
|
absPosition += transform->Position;
|
||||||
|
else
|
||||||
|
absPosition = transform2->Orientation * (absPosition + transform->Position);
|
||||||
} while (entity != 0);
|
} while (entity != 0);
|
||||||
|
|
||||||
return absPosition * accumulativeOrientation;
|
return absPosition * accumulativeOrientation;
|
||||||
|
|||||||
Reference in New Issue
Block a user