Google Code-In 2014
Task Preview
PySoy: Portal PhysicsCopyleft Games Group
STATUS: DRAFT

A new class called soy.bodies.Portal was recently created but currently does very little. Portals are intended to connect to one other portal and allow bodies to move between them. While it could certainly be used for "Portal" type portals, a more mundane use is any door or passageway between two scenes.

Portals need 2 geoms - an "event horizon" and an ode.Space. Any body that's in contact with the event horizon needs to have its geom moved to the portal's space. The portal's space is included in the space of both scenes it connects to in order to facilitate collision detection, effectively, across all three domains.

When a body crosses the event horizon it needs to be moved to the other scene at the cooresponding position. In almost every case its geom will still be in contact with the event horizon of the portal so it will still collide with bodies in the previous scene. The "trick" in all this is geom offset.

Rendering across the portal is the subject for another GCI task, you need only handle collision and moving body migration across the portal. You also do not need to handle bodies which are currently connected to joints.

While working on this task you should join and remain in #CopyleftGames on Freenode to get help, feedback, and guidance from mentors and other developers. Code updates which may affect your work are also announced here as they happen. This is especially important for this task as other GCI tasks may be worked on to modify the same function.

When you've done, commit your work and post the resulting changeset url to this task.