我需要有关如何使用 SDL 通过 OpenGL 旋转图像的帮助
我正在制作一个游戏,角色的手臂将不断旋转,因为它将跟随鼠标光标。 我以前从未使用过 openGL,我需要一些入门帮助。 如果有人知道任何开始学习的好网站以及专门包含轮换的网站,请告诉我。
我已经访问过 NeHe 并访问了该旋转教程,但在尝试完成其他基本教程后,它对我来说仍然很混乱,所以对这个主题的一些澄清也将不胜感激。
另外,我不知道这是否会改变事情,但我需要围绕玩家的“肩膀”旋转,所以我需要知道如何让手臂围绕这一点旋转。
I'm making a game and the arm of the character will be constantly rotating since it will be following the mouse cursor. I've never worked with openGL before and I need some help getting started. If anyone knows any good websites to start learning and one that specifically contains rotation, please let me know.
I've already visited NeHe and went to that rotation tutorial but after attempting to go through the other basic tutorials, it still seems very confusing to me, so some clarification on the topic would also be appreciated.
Also, I don't know if this would change things, but I need to rotate about the player's "shoulder," so I need to know how to make the arm rotate about this point.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 glTranslate 移动坐标系的原点,使用 glRotate 围绕该原点旋转。 不管怎样,你可能应该买一本关于计算机图形学基础知识的书。
如果您对此很认真,请阅读 Alan Watt 的 3d 计算机图形。
Use glTranslate to move the origin of your coordinate system and glRotate to rotate around this origin. Anyway, you should probably get a book about the basics of computer graphics.
If you are serious about this, go for 3d computer graphics by Alan Watt.