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

Make SpaceScene.make_rigid_body not take children of VGroups #18

Closed
icedcoffeeee opened this issue Mar 22, 2022 · 0 comments · Fixed by #19
Closed

Make SpaceScene.make_rigid_body not take children of VGroups #18

icedcoffeeee opened this issue Mar 22, 2022 · 0 comments · Fixed by #19
Assignees

Comments

@icedcoffeeee
Copy link
Collaborator

From discord user Naw Sai: SVGMobjects don't work as rigid bodies.

This is because the function SpaceScene.make_rigid_body takes the whole family of the mobject and applies the rigid property; which explains the explosion, as overlap of rigid bodies are considered high powered collisions.

Suggested Changes

I think a good approach would be to make the function disregard families; if the children are intended to be rigid, then an unpacking operator should be used.

Before:

a = VGroup(Circle(), Square().shift(UP*2))
self.make_rigid_body(a)

After:

a = VGroup(Circle(), Square().shift(UP*2))
self.make_rigid_body(*a)
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 a pull request may close this issue.

1 participant