Skip to content
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

Fix SpawnOnMap objects not scaling on zoom #1825

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jaidhyani
Copy link

@jaidhyani jaidhyani commented Oct 6, 2021

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SpawnOnMap doesn't scale correctly on zoomable maps
1 participant