-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapbox VR scale is wrong #1378
Comments
Hey @asmccormick! if you check
That calculation starting with mathf.Cos is actually a fix for the latitude in fixed size tiles since forcing tiles down to a certain size is a little more complex in y axis because of the mercator tile sizes (they shrink as latitude goes higher/lower). changed
So if you can change that line as shown above and test in Hope that helps! |
I couldn't resists so I created a PR; #1384 |
@asmccormick Thanks for the detailed analysis and awesome ticket 🎉 |
Simplest fix is to set AbstractMap to World Scale and zoom to 16x. Then set y-scale of map gameObject like this
Note that changing the scale of a Unity object may create some strange behaviors from physics, colldiers, raycasting, etc etc. |
Confirmed, this fixes elevation for my application as well, across a range of latitudes. Note that if you are also calling However, if you scale the map transform and call |
Really would love to see #1384 fixed and pushed! |
I'm trying to use Mapbox to create an accurate environment for VR. For example, if a real skyscraper in NYC is 100m tall in real life, it should be 100m tall in VR. I've tried adjusting the zoom scale and changing World Scale to Custom, but no combination of these will make the buildings appear at their actual height.
In hopes of finding a Mapbox-to-Realworld ratio, I gathered some data points.
Here's my methodology:
From these 7 data points, I calculated an average ratio of 6.12. However, I'm not terribly confident in the accuracy of my method, nor do I have any idea what this number signifies.
Does anyone know what 6.12 refers to?
Does anyone know of a precise zoom level where Mapbox creates buildings to their actual scale?
The text was updated successfully, but these errors were encountered: