猫史档案馆


【教程帖】如何在屋里能看到外面的监控(自制代码)

用户:传说之下ULB--sans传说之下ULB--sans查看:9 回复:8 评论:9 创建时间:2022-11-15T13:00:42


先需要三个模型center_imagecenter_imagecenter_image

然后再用代码:

 

const diannao = world.querySelector('#控制台电脑');
diannao.enableInteract = true;
diannao.interactRadius = 3;
diannao.interactHint = '电脑';

diannao.onInteract(({ entity }) => {
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        title: '监控',
        lookEye: world.querySelector('#监控摄像头'),             // 将相机放在玩家位置
        lookTarget: qyg,             //npc可以改
        content:'监控中...',
    });
});
const qyg = world.querySelector('#奇异果博士');

效果图:center_image

 


回复

上一页1 页 / 共 1下一页
传说之下ULB--sans传说之下ULB--sans

ddd

点赞0


评论


ZNS_哪吒ZNS_哪吒

()

点赞0


评论


我求封号我求封号

顶顶顶顶

点赞1


评论


传说之下ULB--sans传说之下ULB--sans

看代码留言(做模型素材)

点赞0


评论


来自远方的panda来自远方的panda

ddd

点赞1


评论


屑怪盗屑怪盗

保存

点赞1


评论


传说之下ULB--sans传说之下ULB--sans

2023

[新春快乐]

点赞0


评论


lingyi_objlingyi_obj

Failed to load plugin: paste from url https://static.codemao.cn/community/tinymce/4.8.5/plugins/paste/plugin.min.js

点赞0


评论