用户:
治愈绾兮查看:220 回复:3 评论:6 创建时间:2021-08-11T13:51:38
我先定义了一个实体
const tnt = world.createEntity({
mesh: 'mesh/TNT.vb',
meshScale: MeshScale,
collides: true,
gravity: true,
position: [
13 + Math.random() * 11,
16,
93 + Math.random() * 16,
],
});
然后,我用射线判断别人和实体的距离
world.querySelectorAll("player").forEach((entity) => {
tntshexian = world.raycast(tnt.position, entity.position)
world.say(tntshexian.distance)
})
结果,返回的值一直是0,这是哪里错了?
array_已退我虽然不知道,但是我猜:
const tnt = world.createEntity({
mesh: 'mesh/TNT.vb',
meshScale: [1/16,1/16,1/16], //改动
collides: true,
gravity: true,
position: [
13 + Math.random() * 11,
16,
93 + Math.random() * 16,
],
});点赞0
评论
这和大小没关系
https://box3.codemao.cn/e/0df16e8b604d8e1c7f06 鬼知道大佬,来帮我一下,求
早就没上岛了,我电脑被收了,现在都是用我妈电脑