猫史档案馆


喵 教程

用户:迷失冷光迷失冷光查看:7 回复:14 评论:7 创建时间:2021-06-27T09:13:12


首先我们需要一个喵的模型

然后给它加上个标签“喵”

然后我们定义一个函数:

function getEntityBounds(entity){
    const lo = entity.position.sub(entity.bounds);
    const hi = entity.position.add(entity.bounds);
    const bounds = new Box3Bounds3(lo,hi);
    return bounds;
}

——注:此函数来自赛车模板

然后遍历所有喵

world.querySelectorAll('.喵').forEach((e)=>{
    const bounds = getEntityBounds(e);
    world.addZone({
        bounds,
        force: [0,0.1,0],
    })
})

 


回复

上一页1 页 / 共 1下一页
umbrallawwumbrallaww

sofa

点赞1


评论


TLOCKTLOCK

来我的飞机场

点赞1


评论


该账号已被封禁该账号已被封禁

女少口阿

点赞1


评论


ssssSSSAssssSSSA

az

点赞1


评论


柚子Gent小号柚子Gent小号

所以,我该说些什么呢

点赞1


评论


禾Y禾Y

林思琪贵,可以来我的地图里帮忙吗?

点赞1


评论


神岛吉吉喵神岛吉吉喵

emotion_编程猫_点赞nice

点赞1


评论


成熟的强袭编程猫548成熟的强袭编程猫548

很实用

点赞0


评论


方块君_大魔王_暂退方块君_大魔王_暂退

 

 

点赞0


评论


ficfrkficfrk

还以为是用此代码进入谷歌,油管等

点赞3


评论


YLG_個YLG_個

()

点赞0


评论


馫龘飝鱻灥麤靐飍朤馫譶龘飝虪齺馫龘飝鱻灥麤靐飍朤馫譶龘飝虪齺

world.querySelectorAll('.喵').forEach((e)=>{ c喵tbounds=getEntityBounds(e); world.addZone({ bounds, force:[0,0.1,0], }) })

点赞0


评论


一勺小汤_纪念号一勺小汤_纪念号

考古

顺便收藏()

点赞0


评论


一只飞鸽一只飞鸽

冷光=冷钢

点赞0


评论