This is a quick script post for anyone who's working with blender's game engine.
Here's one for when you're making a scene and you don't want to be limited by your skybox/dome.
This script allows you to have a camera in a "background" scene mimic the rotation of the camera in your main scene. Hence, it will look like your background scene and main scene exist in the same world, but they're really don't, and so the scenes won't interfere with each other or your lighting.
Here's the script:
***********************************************************************************
import bge
#1)Attach this script to your main camera on your active scene
#2)to make this work, first attach an always sensor to a "scene" background sensor.
#3)Then Attach a separate always sensor to this script
backgroundSceneName = "Put your the name of your background scene between these quotes"
backgroundCameraName = "Put the name of your camera in your background scene here"
#Accessing Active scene's camera
sceneList = bge.logic.getSceneList()
cont = bge.logic.getCurrentController()
own = cont.owner
#Accessing background scene and objects
for scene in sceneList:
if scene.name == backgroundSceneName:
backgroundCamera = scene.objects[backgroundCameraName]
backgroundCamera.worldOrientation = own.worldOrientation
print(backgroundCamera.worldOrientation)
print(own.worldOrientation)
#These should come out the same.*****************************************************************************
A big thanks to Raider from the gameblender.org forum for debugging my original script and actually getting this to work!