In Blender I can move the pose of an object using:
bpy.data.objects["Rig"].pose.bones["Bone"].location += 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"] print(channel.location) 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.