Hello, I am using a splitscreen script made by Goran from Nilunder.
It does work, to an extent. It works if there are no or small background objects.
This is hard to describe so I will use pictures:
In Picture 1 there is no big background object so it works perfectly.
In Picture 2 there is a large background object so the screen is split very oddly, as shown.
Sorry for the poor explanation, I do not know Python although I am learning. So I ask, can anyone please correct my problem? Goran made this for 2.60a so maybe that’s the problem, I don’t know.
The Blend: SplitScreenProblem.blend
The Script:
# Simple split screen script [Blender 2.60a] by:
#
# Goran Milovanovic (www.nilunder.com)
#
# Always (true level off) ________ Python (Module)
from bge import logic, render
def main():
scene = logic.getCurrentScene()
w_w = render.getWindowWidth()
w_h = render.getWindowHeight()
vcoords = ((0, w_w//2), (w_h//2, w_w))
cams = [scene.objects[name] for name in ("Cam_0", "Cam_1")]
for c, v in zip(cams, vcoords):
c.useViewport = True
c.setViewport(v[0], 0, v[1], w_h)
Thank you in advance.