Using existing joints for portal physics (asteroids-like)

Hi,

I looked at the various forum threads about this, but did not find some built-in solution (or did not recognize it).
Thinking a bit about the problem, I think I found something that could work. It's only intuition at this point, so just bash me if I'm completely wrong:

Supposing there are only 2 instances of a portalling object:
There would be 2 pulley joints to constraint the positions of the objects mass centers together.
Plus one distance joint ensuring objects rotate together. Objects masses and momentum inertia would be halved, as mentioned in those other threads.

Image

I think this would not work for all positions, for example when instance A comes close to the white dotted line. But placing the pulley anchors far enough, and depending on the use case, it might not be that big of a problem.

What do you think (or you can just bash) ?

Thanks for your feedback !
Forget it, any numeric example shows that this does not work. Sorry for the post.

Can someone sum up the situation about things that work:
- are some new joints coming, that would help ?
- or did someone provide a simple suitable custom joint ?

Thanks
Hi it's me again,

I think that the accuracy of my system depends on the pulley lengths. It would be perfect with static anchors infinitely far away. That's not feasible without doing another joint type, of course, but I can accept some inaccuracy.

Is there any performance drawback at placing a pulley anchor very far away ? My world would have to be much bigger, but does this have an impact ? And wouldn't a big pulley behave like a big body and degrade collision detection tests ?

Thanks for any info about this subject !

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