猫史档案馆


关于实体那些事。。。

用户:WMoSo岛同号WMoSo岛同号查看:6 回复:2 评论:6 创建时间:2021-08-20T19:30:04


大佬们,求助!请问,这个效果咋做?

center_image


回复

上一页1 页 / 共 1下一页

万能的API会告诉你

点赞0


评论


Forzen_SevenForzen_Seven

//首先给模型加上标签:bcm
c喵t Quat = Box3Quaternion(0,0,0,1);
world.querySelectorAll('.bcm').forEach((e)=>{
    e.enableInteract = true;
    e.interactRadius = 3;
    e.interactHint = '编程猫';
    e.onInteract(({entity})=>{
        c喵t direction = e.position.sub(entity.position);
        e.meshOrientation = Quat.rotateY(Math.atan2(direction.z,direction.x));
    })
})

点赞0


评论