猫史档案馆


《全能吉吉》

用户:云awa云awa查看:0 回复:2 评论:0 创建时间:2022-10-21T19:00:47


center_image


回复

上一页1 页 / 共 1下一页
ZNS_哪吒ZNS_哪吒

sofa()

点赞0


评论


python8python8

看到了,最下角那个吉吉喵模型,是用↓代码做的

//选中所有带有标签target的实体,并遍历循环.
world.querySelectorAll('.target').forEach((e)=>{
e.onEntityContact(({entity,other})=>{  //设置目标模型的碰撞事件.
if(!other.isPlayer){return} //防止非玩家实体参与检测.
other.mesh=entity.mesh;  //设置玩家的外观.
other.meshScale=entity.meshScale;  //设置玩家外观缩放比例.
other.player.invisible=true;  //如果模型比玩家小,就需要隐藏玩家的皮肤.
})
})

点赞0


评论