Skip to content

Commit

Permalink
make sure to set first camera as active at program start.
Browse files Browse the repository at this point in the history
  • Loading branch information
i-make-robots committed Dec 28, 2023
1 parent 28058f7 commit a77a560
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/com/marginallyclever/ro3/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public static void reset() {
for(Camera c : toRemove) cameras.remove(c);
Camera first = new Camera("Camera 1");
cameras.add(first);
setActiveCamera(first);
double v = Math.sqrt(Math.pow(50,2)/3d); // match the viewport default orbit distance.
first.setPosition(new Vector3d(v,v,v));
first.lookAt(new Vector3d(0,0,0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ public Component getListCellRendererComponent(JList<?> list, Object value, int i
camera = (Camera) e.getItem();
Registry.setActiveCamera(camera);
});
if(cameraListModel.getSize()>0) cameraSelector.setSelectedIndex(0);
toolBar.add(cameraSelector);
}

Expand Down

0 comments on commit a77a560

Please sign in to comment.