Hi everybody :),
I am trying to copy bone rotations to a cube through a python script. Because the constraints from the “Object Constraints” panel doesn’t work in the BGE.
I have written a little script, but it doesn’t work. Maybe the syntax is not correct. Or maybe it’s not possible to copy rotations from a bone to an object. The Bone from armature ist animated through an animtion (which is trigged through the actuator logic brick “Action”)
import bge def main(): scene = bge.logic.getCurrentScene() Cube1 = scene.objects["cube1"] RefObject = scene.objects["Armature"].pose.bones["Bone"] Cube1.worldOrientation = RefObject.worldOrientation
What do you think ?
You can download my blend file, to see what I mean exactly.
test5.blend (502 KB)