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

2024-10-01 09:31:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用从Kinect获得的用户数据进行模型的实时映射。 我可以使用bge.types.BL逯ArmatureObject()渠道 列出了骨头的名单。我不能改变位置骨头。我试着用旋转欧拉给它一些旋转,但没有效果。请告诉我怎么做。在


Tags: 数据用户模型types效果名单bl渠道
1条回答
网友
1楼 · 发布于 2024-10-01 09:31:48

可能晚了一点,但对于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

相关问题 更多 >