简体   繁体   English

我的球员射出了90分的子弹

[英]My player shoot the bullets 90 dregrees off

This may be an easy task, but I cant figure it out. 这可能是一项容易的任务,但我无法弄清楚。 This is a 2d game using the LWJGL library. 这是一个使用LWJGL库的2d游戏。 I've created the player using openGL and the bullets with openGL. 我已经使用openGL创建了播放器,并使用openGL创建了项目符号。 The bullets go 90 degrees more to the right. 子弹向右移动90度。

Classes: 类别:

Game class 游戏类

Player class 玩家等级

Bullet class 子弹班

Update class(not important) 更新类(不重要)

Render class(not important) 渲染类(不重要)

笔画演示

So, how can I fix that? 那么,我该如何解决? If its only adding 90 degrees can you tell me how? 如果仅增加90度,您能告诉我如何?

Thanks 谢谢

LWJGL使用弧度,因此在转换为弧度之前,您需要将度数加90。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM