sugarlabs / physics

a box2d playpen
GNU General Public License v3.0
7 stars 26 forks source link

Shapes, especially those linked by chain, cannot be moved #34

Closed PaulMacDonald closed 1 year ago

PaulMacDonald commented 6 years ago

PROBLEM: When using the Physics activity in SOAS, when two shapes are linked with a chain by the user, there is an odd occurrence where no shapes (whether they are chain-linked or not) can be moved at all by the drag tool. The chain can be moved, but all shapes are rendered immovable except by another falling shape that has been created. (Which will also be immovable once it hits the ground.)

SUGGESTED REMEDY: The reason for this problem would possibly be found in the code that allows for shapes chained together to be moved together (i.e. -- when one is dragged around, the other is dragged behind it), as it affects the motion of multiple shapes on the screen, and for some reason could possibly be affecting the mobility of all shapes in the activity once any two or more shapes are chained together. Addressing this specific segment of code, and perhaps limiting its scope of what shapes it can affect (or, rather, how easily it is allowed access to their mobility or immobility) might fix this issue.

quozl commented 6 years ago

Thanks. Please point at the source code line you think is the problem?

PaulMacDonald commented 6 years ago

Unsure -- Which file would I look in to find the code that handles and creates chains that link shapes?

quozl commented 6 years ago

Oh, okay. I was wondering how speculative your suggested remedy was. I don't know either; finding the file will form part of the remediation.

sparshg commented 1 year ago

So I created a few circles, and linked two of them with chains. I clicked on the Grab tool and everything seems draggable. Is this issue still there?

chimosky commented 1 year ago

Tested on F38 SOAS and it works just fine, issue doesn't exist anymore.