mapbox-unity-sdk
mapbox-unity-sdk copied to clipboard
Fix SpawnOnMap objects not scaling on zoom
Related issue
Fixes #1826
Description of changes
The current implementation never sets a parent, so the references to local position and scale in the Update function just refer to global position and rotation. This change sets the AbstractMap _map as the parent of the newly instantiated object and sets local scale according against that. For position we set global instead of local position because GeoToWorldPosition returns the global position.
QA checklists
- [ ] Add relevant code comments. Every API class and method should have
<summary>description as well as description of parameters. - [ ] Add tests for new/changed/updated classes and methods!!!
- [ ] Check out conventions in CONTRIBUTING.md.
- [ ] Check out conventions in CODING-STYLE.md
- [ ] Update the changelog
- [ ] Update documentation.
Reviewers
Tag your reviewer(s). Choose wisely.