猫史档案馆


【神奇代码岛】话说岛3可以侦测鼠标位置吗……

用户:屑student屑student查看:6 回复:5 评论:6 创建时间:2021-08-08T22:33:14


如果有人会可以教我么qwq


回复

上一页1 页 / 共 1下一页
ohdreamohdream

要用射线......我不会()

点赞0


评论


拍打星拍打星

啊射线检测我不会

点赞0


评论


阳光猫阳光猫

/* 按下左键时 */
world.onPress(({ button, entity,raycast }) => {
    if(button === 'action0'){
       console.log(`射线击中的位置: ${raycast.hitPosition}`);
       console.log(`射线击中的方块id: ${raycast.hitVoxel}`);
       console.log(`射线所击中平面的法向量: ${raycast.normal}`);
       console.log(`射线所击中的实体: ${raycast.hitEntity}`);
       console.log(`射线起点: ${raycast.origin}`);


    }
})

/*api参考地址:https://docs.box3.codemao.cn/box3raycastresult.html*/

点赞0


评论


async_functionasync_function

可以的(:不过需要自己尝试(:

点赞0


评论


高贵的木叶龙A35d高贵的木叶龙A35d

???没说清楚啊,是焦点位置还是鼠标在电脑上的位置,或者说摄像头?

点赞0


评论