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

Body.scale doesn't update circleRadius with wireframes turned off #234

Closed
iamjoshua opened this issue Apr 7, 2016 · 0 comments
Closed
Labels

Comments

@iamjoshua
Copy link
Contributor

I just came across issue #92. It doesn't seem to be a problem with wireframes on:
https://jsfiddle.net/pgtb8o74/2/

However, with wireframes turned off, circleRadius does not get updated after scaling:
https://jsfiddle.net/gdxs9vpa/2/

I've had to manually update with:
Matter.Body.scale(circle, 1.3, 1.3);
var radius = Math.sqrt(circle.area / Math.PI);
circle.circleRadius = radius;

I know the old issue was closed but this is a pretty painful "gotcha".

@liabru liabru added the bug label Apr 7, 2016
@liabru liabru closed this as completed in f428d6b Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants