子弹射程

感觉不行,这个同帧写这个节点减去这个节点向量值,返回的一定是0啊。

是我写错了…
let now_dis = this.node.getposition().sub(this.last_pos.getposition()).mag();
this.dis = this.dis + now_dis;
if里面改成这个

this.last_pos.getposition(),这个位置怎么让服务器报出来,,,,我们定义了有上一个节点位置,但是并没有得到啊,,,,老哥 :rofl:

:rofl:就不能稍微改一改…你把this.last_pos后面的.getposition()去掉
let now_dis = this.node.getposition().sub(this.last_pos).mag();
this.dis = this.dis + now_dis;
这样应该没问题了吧
我是直接在论坛上敲得代码,刚好敲错了2次,甚至不知道会不会有第三次,你大概了解下意思就好 :smile:

明白了,多谢老哥,抱拳了 :crazy_face:

该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。