Mirrored Bodies do not behave the same as theyr originals

Hi

I have a simple World which is symetric, meaning that all Bodies on the left side of the middle Axis are mirrored (Copies) to the right side, too (this is done by multiplying the x value of the position Vector by -1). The Simulation however is not the same, which I would expect:
Attachment:
Box2d mirrored objects.png


When not mirroring the Bodies, but just placing a 1:1 Copy on the right side (this is done by adding a given value to the x value of the position Vector), both Body Groups behave the same, as expected:
Attachment:
Box2d copied objects.png


Does this maybe depend on the order in which the Bodies are added to the world, or are there other (good?) reasons for this? It would be great if Somebody could provide a Solution how to have both Simulations (original and mirrored one) behaving the same way.

Thanks a lot
Dan
It's pretty hard to figure out the problem without knowing what you mean by 'behave'.
Ok, new Picture:
Attachment:
Box2D mirror.png
wow you certainly are good with the pictures!
I would first check whether adding the bodies in the same order for each group will help, but I still have my doubts whether you would ever get a perfectly mirrored result. Is is possible to just use physics on one side only and just draw the mirrored version on the other side?
Thanks 😉

I'll try some tweaks with the order. As of now, i've added the first original Body, then it's Copy, then it's mirrored Copy, and then proceeded with the next original Body, but this didn't do the trick.

The Mirror-Thing may seem unreasonable, but the Reason is simple: The Simulation is made on two Client Devices, each one displaying the Picture from "his" Side of View.. so both Clients shoud have the same Simulation Result, even while the second one works on a mirrored World.
You could still have the second device running the same simulation, just render it mirrored though couldn't you? And mirror any input if necessary... I guess it depends on what kind of interaction from the user is necessary as to how far you could take that idea.
Yes indeed! I still don't see why these Differences occur, but your Idea is just great - it already works 😀

Thank you very much for your Help!
Box2D uses an iterative solver that is order dependent. As such, mirroring likely won't work.

Consider a vertical stack of identical square boxes. Such a stack is a mirror of itself. Experience with Box2D shows that tall stacks of boxes eventually fall when the number of boxes passes some threshold. But there is no way for a vertical stack to fall symmetrically. Therefore, a vertical stack fails to be a mirror of itself. Thus mirroring does not work in general.
I understand now.. thanks Erin for your Explanation 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=7319