Making a rigidbody (2d) that responds to more colliders

Phew, that’s a hard title to make. Let me explain what I need.

I’m trying to figure out a way to make a rigidbody teleport itself between rooms. But not a simple transition, these rooms are meant to be stitched together seamlessly. So I can’t simply teleport the rb from the edge of one room to the edge of the other room. At least while it’s in the intersection of the two rooms, this rb needs to exist in both rooms simultaneously. (Think of it like this. If it’s half way in room A, not yet in room b, then it could roll off into the non existent floor right next to it, then it gets teleported to the other room already intersecting the floor.

So how do I go about making a RB exist in two places at once, responding to different colliders around it? My best bet so far is relativejoint2D. I could create this second rb with this joint at the edge or room B when the rb reaches the edge of a room A. But my tests so far have shown this joint to be extremely unreliable. It freaks out during the simplest conditions possible.

I tried really hard to understand what it is you want from your description but nope, don’t follow sorry. :frowning:

Maybe you could draft up some picture that demonstrates what it is you want.

I know! I did a lousy job trying to explain something already hard to explain.

I kind of partially made it work using relative joint. That should help.

Imagine those platforms belong to different rooms and as the ball on the right slides off the platform it should teleport itself to the platform above, where the other ball is now. But in order for the transition to be smooth I need two rb to exist simultaneously at least on the intersection! Otherwise it won’t look like it’s rolling smoothly on solid surface. So what is happening above is my attempt at making the connection part. These rb are connected. When one encounters a collider it’s like both did.

(My gif doesn’t show, apparently, so here’s a link Imgur: The magic of the Internet )

That almost solves all my problems! There’s just one additional snag. The other room might be rotated a bit and I need the connected rigidbody to copy the movements of the original but rotated. It would be awesome if RB had their movements in hierarchy space, instead of world. But alas they do not.

I think it’s a dead end for this whole strategy. Back to the drawing board.

I’d like to help but I don’t follow some of it.

Are you loading/unloading as you transition between them?

Any motion is stored in Rigidbody2D.velocity and Rigidbody2D.angularVelocity so you can transform them easily.