BGESetSceneFlaw.001.blend (1.04 MB)
I created a 3D model in cycles, then decided to switch to BGE.
In BGE I created two scenes, each with an overlay scene (so four scenes total). The overlay scenes contain a tab on the left side of the screen to switch to the other scene when the tab is clicked.
Each time I click on a tab in play mode, it switches to the other scene like it is supposed to. The problem is, both scenes are displayed simultaneously. Then switching scenes again results in additional copies of the scenes being displayed (see attached image).
Has anyone seen this before? If so, what did I do to cause it, and how do I correct the problem?
If you decide to download the blend and python files to try it out, use the mouse wheel in the first scene to zoom. In both scenes, click and drag the left mouse button to pitch and rotate the object in the scene.
import bge # Define global variables keyboard = bge.logic.keyboard mouse = bge.logic.mouse # Use mouse.position[0|1] to get x|y (range is 0.0 to 1.0) cont = bge.logic.getCurrentController() own = cont.owner scene = bge.logic.getCurrentScene() camera = scene.active_camera # Define the methods/functions... #def respondToKeyboardInput(): # END respondToKeyboardInput() def respondToMouseInput(): wheelDown = cont.sensors['ZoomCameraOut'] wheelUp = cont.sensors['ZoomCameraIn'] currentLens = camera.lens if wheelDown.positive: currentLens -= 2.0 if currentLens > 80.0: currentLens = 80.0 camera.lens = currentLens if wheelUp.positive: currentLens += 2.0 if currentLens < 20.0: currentLens = 20.0 camera.lens = currentLens # END respondToMouseInput() #respondToKeyboardInput() respondToMouseInput()