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

Matter.Body.scale on circles does not rerender bodies #92

Closed
mizhgan opened this issue May 13, 2015 · 2 comments
Closed

Matter.Body.scale on circles does not rerender bodies #92

mizhgan opened this issue May 13, 2015 · 2 comments

Comments

@mizhgan
Copy link

mizhgan commented May 13, 2015

Hello!
If you apply Matter.Body.scale on circle body generated by Bodies.circle it not rerender scaled circle in the world. Bounds seems to be ok, and in wireframes mode everything looks good, also rectangles works great. But circles, in wireframes=false mode stays the same visually.
Whats the example, based on one of codepens - http://codepen.io/anon/pen/ZGWypP
Thanks for great engine by the way!

@liabru
Copy link
Owner

liabru commented May 13, 2015

The built in renderer uses a special body property called body.circleRadius to render circles, since they are not actually true circles.

But for this to work automatically with Body.scale I'd need another special case, which I'd rather avoid. For now you can add the code:

body.circleRadius *= scaleFactor;

@mizhgan
Copy link
Author

mizhgan commented May 15, 2015

Thanks, i got it.

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

No branches or pull requests

2 participants