benelot wrote:What is your main benefit of multiple worlds? What changes from one to the other?
Being inside a portal and being behind a portal are two different worlds existing in the same space so need multiple physics worlds. Hope you nderstand can't have just one physics world.
I may have to create a "ghost" object/s, one for each world and if an object collides with a object in one world then update the position of the other "ghost object/s too.
But may have a problem if the updated ghost object/s then collide with an object due to it's new position, don't want to end up in some strange infinite loop.
Can't simply switch worlds as the the object may go though multiple portals if the object is large such as a car or truck and the portals are close together.
I'm creating an applications and games engine and don't know what programmers are going to impliment so need to cater for most posibilities.
-------
For those that are interested in my portals implimentation, it's all done in a single render pass, no rendering individual portals contents to an offscreen buffer and rendering the texture to the portals entrance.
The engine is a differed renderer, was not sure if could do portals with deferrerd rendering but turns out it can be done.
Lights and shadows can enter and leave the portals and even span multiple portal too.
If im correct this is new technology?
I'm also creating a 3D GUI system, Windows, Scrollbars, Buttons ect. All in 3D, portals are a requirement as don't want to render to the sides or behind the 3D windows but do want the contents to be scrollable and even have objects such as characters and models pop out of the 3D windows for an interesting presentation.