Fixed some faces dissapearing on some models

Serializing environement ambient color
This commit is contained in:
Antoine Pilote
2023-09-16 01:31:42 -04:00
parent 70e766a899
commit c808d2f061
6 changed files with 15 additions and 8 deletions

View File

@@ -50,9 +50,9 @@ namespace Nuake
auto& animationTrack = animation->GetTrack(boneName);
Entity& boneEntity = m_Scene->GetEntity(boneName);
Entity& boneEnt = Entity{ (entt::entity)bone.EntityHandle, m_Scene };
Entity& boneEnt = m_Scene->GetEntityByID(bone.EntityHandle);
///assert(boneEnt.GetHandle() == boneEntity.GetHandle());
if (boneEnt.GetHandle() != 0)
if (boneEnt.IsValid())
{
auto& transformComponent = boneEnt.GetComponent<TransformComponent>();
bone.FinalTransform = transformComponent.GetGlobalTransform() * bone.Offset;