Bullet and multiple semi-independent spaces?

Solra Bizna
Posts: 1
Joined: Fri Mar 11, 2011 11:15 pm

Bullet and multiple semi-independent spaces?

Post by Solra Bizna »

I'm working on a game/simulation engine built around a concept of many independent spaces linked by portals. A portal is defined by a plane and a convex polygon on the plane. If an object overlaps with this polygon, it is considered to be in both spaces at once; its local view of space for collision purposes is supposed to consist of its "native" space on one side of the plane and the "foreign" space on the other side. To prevent strange overlap issues, the plane outside the polygon acts as a solid, infinitely-thin barrier for objects overlapping the polygon, and the polygon acts as a solid, infinitely-thin barrier for objects overlapping the plane elsewhere. Everything about the portals is set in stone, except that the ability to attach portals to simulated objects, the ability for an object to overlap more than one portal, and the ability to link a space to itself with a portal (more than a few people on the team are Portal fans) are all considered "desirable, but optional."
This project does not have the spare manpower to write a fully-featured physics engine from scratch, so I am supposed to evaluate the feasibility of using an existing physics engine. I foresee two problems integrating any existing physics engine:
* Collision detection needs to be heavily supplemented or replaced entirely. I couldn't find any documentation on how feasible this is in Bullet, though it seems possible in ODE at least.
* Inter-object constraints need to be able to deal with different origins for different objects. They remain well-defined as long as the portal through which interaction takes place is well-defined.
I spent some time crawling fruitlessly through Bullet's sparse documentation looking for information that might help me, but I don't have all that much time to spare, so I decided to ask. Inter-object constraints are not considered mandatory, so the big question driving integration of a physics engine is about collision detection. Can Bullet's collision detection system be suitably altered and/or completely replaced?
-:sigma.SB
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Bullet and multiple semi-independent spaces?

Post by Erwin Coumans »

There is no easy way to do this in Bullet 2.x, you might want to try your luck with ODE.

Thanks,
Erwin