hey guys, i know this might sound like i;m doing things the hard way, but i’ve been trying to switch cameras via keyboard input but using only one actuator. The reason for this is that each camera is controlled by the mouse and behaves differently, therefore depending on what camera is active i have to establish the proper mouse interaction. I’m trying to use only one actuator because the only way (afaik) to find out witch camera is active is the getCamera() method inside the scene actuator.
here’s my script :
controler=GameLogic.getCurrentController()
topCam=controler.getSensor(“topCam”)
frontCam=controler.getSensor(“frontCam”)
camera = controler.getActuator(“camera”)
if topCam.isPositive() :
print “ne uitam prin camera de sus”
camera.setCamera(“OBtopCam”)
if frontCam.isPositive():
print “ne uitam prin camera frontala”
camera.setCamera(“OBfrontCam”)
and here’s my logic block setup :
globalControlls is an empty
the two keyboard sesnors listen for the one and two keys
and my problem is that this desn’t work, even if the console prints out the correct messages the cameras don’t switch