Previous Thread  Next Thread

chat icon Controlling a camera with python scripting

strattonbrazil

Posted: Fri Jul 27, 2012 5:01 am
Joined: 06 Sep 2006
Posts: 7
If I'm in a controller for a non-camera object, is there an equivalent gluLookAt type function I could use to orient the active camera in the scene? Right now I've ignored the camera so when my game starts, it uses the same camera as the blender viewport. However, if I try to set the position, the screen goes blank when I start the game.

Code:

scene = bge.logic.getCurrentScene()
camera = scene.active_camera
camera.position = [10,10,10]
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group