I manipulate a game property using logic bricks. I can read the property in the following script and set the value of bpy.context.scene.game_settings.stereo_eye_separation which is changed as long the value is less than 5.0.

Unfortunately, setting this value during runtime has no effect.

Is there any 'update' method I'm supposed to call or another way to apply the changes?

import bge
import bpy

co = bge.logic.getCurrentController()
print( co )
sep = co.owner["eye_separation"]
print( " property:%f" % sep )
bpy.context.scene.game_settings.stereo_eye_separation = co.owner["eye_separation"]
print( "gs.stereo:%f" % bpy.context.scene.game_settings.stereo_eye_separation )

The bpy module is unlikely to have any effect during game play; you should use bge instead. Try bge.render.setEyeSeparation().


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.