game-development - 如何在游戏制作者 2 中从枪管中发射子弹 [已解决]
问题描述
当我用偏移射击子弹时(当射击子弹时,即使我说它向上瞄准,子弹也会像枪一样向前产生)
偏移量不会将枪支旋转计入帐户。
问题视频:https ://imgur.com/a/N3UxVHw 。
这是枪/射击代码:
x = oPlayer.x + 30;
y = oPlayer.y;
image_angle=point_direction(x,y,mouse_x,mouse_y);
firerate -= 1;
if mouse_check_button_pressed(mb_left)
{
with(instance_create_layer(x + lengthdir_x(50,image_angle) ,y ,"Bullets",oBullet))
{
speed = 20;
direction = other.image_angle;
image_angle = direction;
}
}
提前致谢!
[解决方案]
编辑:经过 3 个多小时的搜索,我找到了解决方案:
解决方案
推荐阅读
- zsh - zsh 的标准文件夹结构是什么?
- typescript - 通过模块扩充向外部类添加方法:错误
- r - R Shiny:使用逻辑条件从 checkboxGroupInput() 反应性地子集数据帧
- html - 单品变化包裹填充物,额外空间 woocomerce
- confusion-matrix - 对验证数据使用 SMOTE(即不平衡)
- kubernetes - 如何在 kubernetes pod 上挂载 afs 文件系统
- javascript - 从数组中获取唯一值,但也显示它的重复数量(javascript - reactjs)
- django - 尝试从 django 应用程序创建可执行文件时出现 Pyinstaller 问题
- java - 如何转储 XWPFDocument 的 XML 正文?
- c++ - OpenGL / FreeType 字体文本未显示在窗口上