mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

Fix SpawnOnMap objects not scaling on zoom

Open jaidhyani opened this issue 4 years ago • 0 comments

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.

jaidhyani avatar Oct 06 '21 02:10 jaidhyani