Zoom Fit Nameplate's "Zoom Min" and "Zoom Max" does nothing?
Shushuda opened this issue ยท 3 comments
Perhaps I don't understand fully how this option is supposed to work, but when I enter combat with "Zoom Fit Nameplate" on, as well as "Continuously Adjust" on and "Entry Zoom As Min" off - the camera always starts in the same position it was in before I entered said situation and doesn't adjust to the "Zoom Min" value even if it's higher than the entry zoom. It doesn't matter what value I use for the "Zoom Min" and the entry zoom.
So, for example, when I type in "Zoom Min" as 10 and "Zoom Max" as 12 and enter combat with Zoom Level set at 6 - the camera stays at 6. When I try to manually zoom out, it snaps to the "Zoom Min" value (so it treats Zoom Min as a maximum zoom allowed). I can zoom fully in, though, no matter the Zoom Max setting.
Reversing values for Min (12) and Max (10) allows me to manually zoom out more (it again treats Min as Max), but I can still zoom in fully AND it still snaps the camera at that entry zoom (6) when I enter combat and doesn't adjust to the provided values unless manually trying to zoom out.
Entering combat with zoom set at a value higher than both Zoom Min and Zoom Max snaps the camera to Zoom Min value and doesn't allow it to exceed that value when manually zooming out, completely ignoring Zoom Max, but allows the camera to manually zoom in all the way.
What I want to achieve is for the camera to continuously adjust to the nameplates, but having the Zoom Min value as the definite minimum zoom it's allowed to use when fitting, and Zoom Max value as the definitive maximum. That's how I interpreted how these settings are supposed to work.
So in practise what I want to achieve:
I enter combat with Zoom at 6. Camera wants to stay at 6, because the nameplate is positioned low, but it snaps instead to the minimum value (Zoom Min), which is 10. When automatically adjusting during the fight, it cannot zoom out more than 12 and zoom in more than 10. So basically, the camera zooms out upon entering combat, but adjusts itself to nameplates continuously while still respecting provided value range. Zooming the camera out upon entering combat is the most important thing of the above.
At this time, I cannot get the Zoom Min and Zoom Max to work as intended (if that is how they were intended to work, that is).
Without looking at the code itself, it looks as if Zoom Min is treated as maximum, but Zoom Max isn't seen by the addon. So in practice addon sees a maximum value allowed (but wrongly named "Zoom Min"), so it doesn't allow zooming out more and snaps to that value when the camera is set higher upon entering combat. But it doesn't see any minimal value, so it allows to zoom all the way in and doesn't snap to any value when entering combat, because it isn't provided any value to snap to.
I appreciate your detailed description of the issue. Unfortunately I cannot help you with this as I have never really used the "Fit Nameplate" functionality of DynamicCam. Mpstark currently seems to only put minimal effort into the maintenance of DynamicCam. We were happy that he did some updates for the BfA launch at all. :-)
i also noticed this happening since 8.1 (or was it 8.1.5?).
dug myself in a bit and narrowed it down to the following:
in Core.lua:
in line 294 you have a function called "fitNameplate", which calculates how much the nameplate is offset and how much the zoom must be corrected.
for that, the value how much the nameplate is offset is calculated with the value "error" in line 316. this value seems to always result in a grossly negative value, meaning that the cam has to zoom-in 24/7. to not do anything it has to be between -3 < error < 3. for a zoom-out it must be at least 3 or higher.
digging a bit deeper, it looks like the calculation itself is somewhat working, but the value "nameplatePosition" is always returned as 90 (for me), which is just way too high.
i've manually tested it by printing "error" in my chat, so i could determine where the nameplate should be placed. turned out, the nameplate never went beyond a "ratio"-value of 77.xyz, which explains why the "90" from nameplatePosition are grossly too big.
i'd commit a pull request for that change, but i'm not sure in what way "nameplatePosition" alters for others.
tl;dr: replacing nameplatePosition in line 316 of core.lua with the value "70" resulted in a decent experience for me, but you better test yourself what suits you better.
update:
as of 8.2. the functions GetTop() and GetBottom() are protected functions for nameplates, therefore the actual position of them can not be requested anymore. i think this setting, as awesome as it was, is dead. :(