如何在模型中的 XNA 中旋转单个骨骼?
我正在 XNA 中制作一款射击角色扮演游戏。我在 Blender 中制作了一个人体模型并将其导入到 XNA 中。我加载了它并且可以旋转整个模型,但是如何旋转每个骨骼?我尝试在谷歌上查找这个问题,但没有找到好的答案。
I'm making a game in XNA that is a shooting role-plaing game. I have made a human model in Blender and imported it into XNA. I loaded it and can rotate the entire model, but how do I rotate each bone? I tried looking this up on google, but found no good answers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看教育部分中的简单动画示例:http://create。 msdn.com/en-US/education/catalog/sample/simple_animation
我知道一开始它可能看起来很复杂,但你真的必须坚持下去,直到你掌握它,没有太多的捷径 它。
Check out the simple animation sample in the education section: http://create.msdn.com/en-US/education/catalog/sample/simple_animation
I know it can seem complicated at first, but you really have to stick it with it until you groc it, there isn't too many shortcuts to it.
确保每次绘制模型时都复制 AbsoluteBoneTransforms
这就是
旋转使用:-
ChangeBoneTransform(1, Matrix.CreateRotationX(0.1f)); //在Update()方法中
Make sure you copy AbsoluteBoneTransforms each time you draw your model
That's it
To rotate use :-
ChangeBoneTransform(1, Matrix.CreateRotationX(0.1f)); //in the Update() Method