hi gamemaster,
Mouse look rotates Camera_Pivot and camera_rot_leftRight. The code in the Text file only gets and sets the orientation for the Camera_Pivot. For it to work like you want, the code needs to get and set the orientation for both Camera_Pivot and camera_rot_leftRight.
(I also renamed your x,y and z to xOrient, yOrient and zOrient.)
Original Text code
g = GameLogic
c = g.getCurrentController()
o = c.owner
w = c.sensors["w"]
s = c.sensors["s"]
moveAct = c.actuators["move"]
print o.position
#start of movement:
if w.positive:
o["x"],o["y"],o["z"] = o.localOrientation
#end of movement
if s.positive:
o.localOrientation = o["x"],o["y"],o["z"]
Text with code added
g = GameLogic
c = g.getCurrentController()
o = c.owner
w = c.sensors["w"]
s = c.sensors["s"]
moveAct = c.actuators["move"]
# get the current scene
scene = GameLogic.getCurrentScene()
# get list of objects in scene
objList = scene.objects
# get object named camera_rot_leftRight
camRot = objList["OBcamera_rot_leftRight"]
#start of movement:
if w.positive:
o["xOrient"],o["yOrient"],o["zOrient"] = o.localOrientation
# get the local orientation of object camera_rot_leftRight
camRot["xOrient"],camRot["yOrient"],camRot["zOrient"] = camRot.localOrientation
#end of movement
if s.positive:
o.localOrientation = o["xOrient"],o["yOrient"],o["zOrient"]
# set the local orientation of object camera_rot_leftRight
camRot.localOrientation = camRot["xOrient"],camRot["yOrient"],camRot["zOrient"]
Clark