从一定的旋转位置发射子弹
我在计算子弹的x&;时遇到问题;y位置。 我希望子弹在飞机的(中心)X-26,Y+34处产生。问题是,飞机可以旋转
这就是我目前所知道的,但它只是在飞机前面制造子弹
ServerBullet b = new ServerBullet(ownerId, rot);
b.x = this.x + (float) (Math.cos(rotRad) * 34);
b.y = this.y + (float) (Math.sin(rotRad) * 34);
bullets.add(b);
Where bullet needs to spawn(图片)
项目符号需要在图像中标记的“X”处生成
共 (0) 个答案