This commit is contained in:
Antoine Pilote
2023-07-14 12:32:26 -04:00
parent 94ba63cc28
commit 6384c39efd
4 changed files with 4 additions and 22 deletions

View File

@@ -259,7 +259,7 @@ void GizmoDrawer::DrawGizmos(Ref<Scene> scene)
flatShader->SetUniformVec4("u_Color", Vector4(0.0f, 1.0f, 0.4f, 1.0f));
const auto scaledTransform = glm::scale(transformComponent.GetGlobalTransform(), Vector3(0.25f, 0.25f, 0.25f));
//renderList.AddToRenderList(_gizmos["player"]->GetMeshes()[0], scaledTransform);
renderList.AddToRenderList(_gizmos["player"]->GetMeshes()[0], scaledTransform);
renderList.Flush(flatShader, true);
}

View File

@@ -372,6 +372,7 @@ namespace Nuake {
{
Ref<EditorCamera> editorCam = Engine::GetCurrentScene()->m_EditorCamera;
Vector3 camDirection = entity.GetComponent<CameraComponent>().CameraInstance->GetDirection();
camDirection.z *= -1.0f;
editorCam->SetTransform(glm::inverse(entity.GetComponent<TransformComponent>().GetGlobalTransform()));
}
ImGui::Separator();