-
Notifications
You must be signed in to change notification settings - Fork 1
Add camera saving feature #9
base: master
Are you sure you want to change the base?
Conversation
pascallj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, a very useful feature, thank you! Some minor comments below.
src/main/java/nl/pascalroeleven/minecraft/mineshotrevived/client/OrthoViewHandler.java
Show resolved
Hide resolved
src/main/java/nl/pascalroeleven/minecraft/mineshotrevived/client/OrthoViewHandler.java
Show resolved
Hide resolved
| } | ||
| zoom = zoomSaved; | ||
| xRot = xRotSaved; | ||
| yRot = yRotSaved; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, it is more intuitive to add the structure like this (and also saves an assignment):
if camSaved then
stuff = stuffSaved
else
stuff = defaults
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, when camSaved is false, both stuff and stuffSaved need to be changed, which is the function of Alt+0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no camera saved, why do have to initialize the stuffSaved variables to the defaults then? Because the next time you want to save a camera, these are overwritten anyway. And reset() is called every time the othogonal view is enabled.
The only other time these variables are used, is in the setZoom calls, but these seem redundant to me.
| xRot = 0; | ||
| yRot = mod ? -90 : 90; | ||
| } else if (keyRotateS.isPressed()) { | ||
| setZoom(zoomSaved); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do all the setZoom calls accomplish here? To me this has an additional downside that the zoomlevel is reset every time you want to switch between these standard views.
Add the feature that you can save the zoom and ratation with Numpad 0 to restore them the next time you enable the ortho view, which makes it possible to capture the same entity or structure with the same size and ratation.