mapbox / mapbox-unity-sdk

Mapbox Unity SDK - https://www.mapbox.com/unity/
Other
720 stars 214 forks source link

Replaced buildings position changed when activating/deactivating SubLayer after scaling the map. #1571

Open dm67x opened 4 years ago

dm67x commented 4 years ago

I notice that when I zoom and active/deactivate a sublayer inside MapLayers the buildings that I use to replace buildings of MapBox with prefabs aren't correctly aligned. Because I use prefabs where I change the position x and z of my model to make it correctly aligned with roads.

Steps to reproduce the problem:

When buildings are aligned: aligned_buildings

When the issue occur: aligned_buildings_issue

brnkhy commented 4 years ago

@dm67x what exactly do you mean by change scale of map? Which settings? Or do you mean rescaling the transform? I think it wouldn't be surprising if it's the latter as we never thought of a case like that (I think) 🤔

dm67x commented 4 years ago

When I say scale of map, I talk about the zoom level. I use prefab for each building models, then I use the ReplaceFeatureModifier to replace the buildings provided by MapBox with my prefab, but for certain buildings they are not correctly aligned because the shape of building are different, so I wanted to aligned them manually with updating the prefab. When I do that and when I change the zoom level, some buildings are not aligned correctly. I think the problem is because some of them are between two tiles.