3
$\begingroup$

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 )
$\endgroup$

1 Answer 1

4
$\begingroup$

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

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .