Reworked editor camera

This commit is contained in:
antopilo
2023-03-07 17:26:13 -05:00
parent 10baf5271a
commit 6cbad0e13b
20 changed files with 126 additions and 114 deletions

View File

@@ -1406,7 +1406,12 @@ namespace Nuake {
if (entityIsSelected && Input::IsKeyPressed(GLFW_KEY_F))
{
editorCam->IsMoving = true;
editorCam->TargetPos = Vector3(0, 0, 0);
editorCam->TargetPos = Selection.Entity.GetComponent<TransformComponent>().GetGlobalPosition();
}
if (entityIsSelected && Input::IsKeyPressed(GLFW_KEY_ESCAPE))
{
Selection = EditorSelection();
}
}