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

[Closes #505] Fix child actor width and height calculations to take into account parent scaling #645

Merged
merged 5 commits into from
Sep 4, 2016

Conversation

kamranayub
Copy link
Member

@kamranayub kamranayub commented Sep 4, 2016

Closes #505

image

Context

Child actors were not properly taking into account parent(s) scale when calculating their world width and height, so the bounding boxes and unit circle were not properly scaled/drawn.

Debug draw was compensating for previous world coord calculation (that has been fixed), so removed the canvas context transformations.

Proposed Changes:

  • Fix Actor.getWidth() and Actor.getHeight() to take into account global scale
  • Fix debug drawing to work properly
  • Add unit test coverage

@kamranayub kamranayub added the bug This issue describes undesirable, incorrect, or unexpected behavior label Sep 4, 2016
@kamranayub kamranayub added this to the 0.7.1 Release milestone Sep 4, 2016
@jedeen
Copy link
Member

jedeen commented Sep 4, 2016

Thanks for fixing this!

The pull request title is currently 96 characters long, almost double the maximum length of a commit title. Part of this length could be reduced by removing the [Closes #issue_num] prefix, since that information is already conveyed via body of the commit message in the pull request template.

@eonarheim
Copy link
Member

Looks good :shipit:!

@eonarheim eonarheim merged commit c28a160 into master Sep 4, 2016
@eonarheim eonarheim deleted the 505-bounding-debugdraw branch September 4, 2016 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

debug draw bounding boxes are not properly aligned for child actors
3 participants