-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
debug draw bounding boxes are not properly aligned for child actors #505
Comments
Is this a visual test (and if so which one)? |
I don't think it has one, the coordinate test might be good to use for this issue |
Oh sure, yeah I can test it. I have a feeling this is fixed. On Fri, Sep 2, 2016, 16:33 Erik Onarheim notifications@github.com wrote:
|
The issue is simply that we fixed child actor world coords, and the debug draw was trying to compensate from previous poor world coordinate calculation. |
Actually, it was worse-- |
Closes #505 ![image](https://cloud.githubusercontent.com/assets/563819/18231954/a6ffd300-728a-11e6-8f9c-43f49a304059.png) ## 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. ## Changes: - Fix `Actor.getWidth()` and `Actor.getHeight()` to take into account global scale - Fix debug drawing to work properly - Add unit test coverage
In the image below, the red square is a child actor of the white square.
The text was updated successfully, but these errors were encountered: