Following the code posted here on the forums, I am setting up a split screen mode in my game like this:
base.camNode.setActive(0) base.makeCamera(base.win, displayRegion=(0,.5,0,1)) base.makeCamera(base.win, displayRegion=(.5,1,0,1))
I then add two player models and upgrade the two cams in a task like this:
for i in (1,2): base.camList[i].setPos(self.ships[i].model.getX(), self.ships[i].model.getY()-6, 16) base.camList[i].lookAt(self.ships[i].model)
So far, so non-controversial. The thing is that both cameras seem to follow the ships, i.e. the lookAt commands seem to work. But the cams seem to stay in the same place, instead of following the models. The result looks like a surveillance camera, or rather two of them. I don’t see any error messages, so the cameras must follow something?!
My gut feeling is that the default camera is still active. I tried to understand what the attributes: base.camNode, base.camList, base.camera and base.cam mean in ShowBase, but so far I only understand that the camList is a list of all cameras. Adding the two additional cameras extends the camList to three elements, which feels weird to me. I guess camNode, cam or camera refer to the default cam, which I have de-activated (I guess). Do I have to delete these attributes explicitely and re-create them for my additional cams?
What am I missing?