Wrong coordonates on surface view
Laynord opened this issue ยท 6 comments
template is bold
sample data is italicized
Issue Description:
I am running a 1.12.2 server with the dynmap plugin on it and ony this one i am currently rendering some chunks in cave mode
and came across the surface mod's coordonates and looked at what they correspond to and they were not the same as the ones o the flat version ( wich are the correct ones )
- Dynmap Version: Dynmap-3.5-beta-2-spigot
- Server Version: paper-1.12.2-1620
- Pastebin of Configuration.txt: https://pastebin.com/5SETL3z2
- Server Host (if applicable): Local
- Other Relevant Data/Screenshots:
Steps to Replicate: Just create any map and try to locate a block with the cursor
The 3d ( surface mode ) ones are wrong
[ ] I have looked at all other issues and this is not a duplicate
[ ] I have been able to replicate this
because of the perspective and height difference, this issue arises, unless we want to do some complicated math wrt the perspective angle, height, original location and rotation, this issue will stay. You are free to commit any edits to the pull requests if you want to implement / fix this feature.
As i would try to do so could you indicate to me where i should start to look fro cursor coordinates treatement in a plugin i'm not used to working on work from others and am not fully in java code / spigot either but as far as math and research goes i should maybe be able to do something ?
And what calculations did you currently do as they seem to be at least somewaht correct
not just the point you would be pointing on the 2d if it was in place of the surface view
all the calculation is done in the coords.js file here: https://github.com/webbukkit/dynmap/blob/v3.0/DynmapCore/src/main/resources/extracted/web/js/coord.js#L44
seems to get the projection (angle and elevation), from sea level (64) then do some math on rounding and implementing it
Doing this would require generation of a whole additional layer of data - a z-buffer, technically - which cannot be stored in the image file, but would be as large as a black and white image (basically, recording the y coordinate corresponding to each pixel - at least 8 bits, but 10+ for modern maps). Honestly, this isn't gonna happen, as it isn't important enough to add to the map data size that literally everyone already bitches about.
Doing this would require generation of a whole additional layer of data - a z-buffer, technically - which cannot be stored in the image file, but would be as large as a black and white image (basically, recording the y coordinate corresponding to each pixel - at least 8 bits, but 10+ for modern maps). Honestly, this isn't gonna happen, as it isn't important enough to add to the map data size that literally everyone already bitches about.
I ran into the same problem on version 1.16.5. I decided not to create a new topic, since this bug is already being discussed here. Is there a planned solution to the problem?
The fact is that the regions of the DynMap-WorldGuard plugin are not displayed correctly in the 3D version due to this error and it does not look nice:)