在blender游戏引擎中使用python改变骨骼的位置



我正在用Kinect获得的用户数据进行模型的实时映射。我能够使用bge.types.BL_ArmatureObject().channels访问单个骨骼给出了骨头的列表。我不能改变骨头的位置。我试图使用rotation_euler给它一些旋转,但它没有效果。请告诉我怎么做。

可能有点晚了,但对于blender>= 2.5来说,这应该是可行的:

# Get the whole bge scene
scene = bge.logic.getCurrentScene()
# Helper vars for convenience
source = scene.objects
# Get the whole Armature
main_arm = source.get('NAME OF YOUR ARMATURE')
main_arm.channels['NAME OF THE BONE YOU WANT TO ROTATE'].joint_rotation[ x, y ,z] # x,y,z = FLOAT VALUE
main_arm.update()

我还在一个广泛的教程中写下了这一点,从这里开始:http://www.warp1337.com/content/blender-robotics-part-1-introduction-and-modelling

最新更新