In Blender I can move the pose of an object using:

bpy.data.objects["Rig"].pose.bones["Bone"].location[0] += 0.1

In fact, if I execute this code in the game engine, it does nothing in the game engine, but when I come back to blender the object's pose has moved as expected.

How do I achieve the same thing in the game engine? I want to move some eyes based on a simple keyboard input.


I have found that I can access, but not update, this value in the game engine with:

import bge
channel = bge.logic.getCurrentController().owner.channels["Bone"]

Console output:
<Vector (1.1683, -0.0078, 0.0000)>

Trying to update that value with channel.location.x += 0.1 does nothing in-game though.


1 Answer 1


I was missing an update call: armature.update()

More precisely, bge.logic.getCurrentController().owner.update() needs to be called after any updates to the armature in order for it to update in the game engine.


You must log in to answer this question.

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