Skip to content

Commit

Permalink
Fixed so that focusing on selection doesn't go to origin if nothing i…
Browse files Browse the repository at this point in the history
…s selected
  • Loading branch information
fLindahl committed Nov 11, 2024
1 parent 47c69b8 commit 9295f4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions toolkit/editor/editor/ui/windows/scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ Scene::FocusCamera()
{
auto selection = Tools::SelectionTool::Selection();

if (selection.IsEmpty())
return;

//TODO: Use bboxes to more accurately calculate the distance offset to the object after moving the camera

Math::vec3 centerPoint = Math::vec3(0);
Expand Down

0 comments on commit 9295f4e

Please sign in to comment.