猫史档案馆


【box3】可以载人的火车?还可以移动?!快来看看!

用户:YDS尹子YDS尹子查看:84 回复:58 评论:84 创建时间:2020-05-30T12:15:01


https://box3create.codemao.cn/games/452dbbc6f39e9e776012

center_imagecenter_imagecenter_image

https://box3create.codemao.cn/games/452dbbc6f39e9e776012


回复

上一页1 页 / 共 2下一页
编程猫小号编程猫小号

沙发!!!

点赞0


评论


BSS梅者如西BSS梅者如西

百度

点赞0


评论


_Rise__Rise_

地板

点赞0


评论


ZCH编程小贝壳ZCH编程小贝壳

天花板

点赞0


评论


cool-creepercool-creeper

怎么做的?!跪求教程!!!!

点赞0


评论


流浪月球流浪月球

https://box3create.codemao.cn/games/d7b8a7e3a78b4b88b7bb

尹子帮帮忙吧

点赞0


评论


神岛吉吉喵神岛吉吉喵

不错加油!emotion_编程猫_加油

点赞0


评论


YDS尹子YDS尹子

公开代码:

(有一些代码之外的准备事项:

1.放置模型,添加标签“gb2”

(模型的话是一面墙一个,这样中间才能站人)

2.把模型放置到合适位置

注意:若行驶方向不对请修改Velocity的方向

(async function(){
while (true) {
        for(let i=0;i<15;i++){//火车向前加速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z-=0.1;    
            })
            await sleep(120)
        }
        
        await sleep(4500)//行驶中
        for(let i=0;i<15;i++){//火车向前减速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z+=0.1;    
            })
            await sleep(120)
        }
        await sleep(3000)//停站中
        for(let i=0;i<15;i++){//火车向后加速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z+=0.1;    
            })
            await sleep(120)
        }
        
        await sleep(4500)//行驶中
        for(let i=0;i<15;i++){//火车向后减速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z-=0.1;    
            })
            await sleep(120)
        }
        await sleep(3000)//停站中
  } })();
world.querySelectorAll(".gb2").forEach((entity)=>{
    entity.friction=1;    
})

点赞0


评论


蕉饼蕉饼

wtf

点赞0


评论


Ken李Ken李

天花板

点赞0


评论


啸猫啸猫

代码

点赞0


评论


lon江航lon江航

emotion_编程猫_点赞

点赞0


评论


YDS尹子YDS尹子

center_image

双线

点赞0


评论


Chara_juechuief_sChara_juechuief_s

66666666666666666666666666666666666666666666

点赞0


评论


神龙_build神龙_build

厉害

点赞0


评论


lRobinllRobinl

我来看看

点赞0


评论


神龙_build神龙_build

https://box3create.codemao.cn/games/6e14725ffb5fa1c8b7b4

点赞0


评论


149139149139

nb

点赞0


评论


查理九世1查理九世1

nb

点赞0


评论


GZ006GZ006

尹子,请问模型是什么

点赞0


评论


build_一只建筑师吖build_一只建筑师吖

楼主楼主~

我弄了一个火车不会移出世界的代码~

(async function(){
while (true) {
        for(let i=0;i<15;i++){//火车向前加速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z-=0.07;    
            })
            await sleep(120)
        }
        
        await sleep(4500)//行驶中
        for(let i=0;i<15;i++){//火车向前减速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z+=0.07;    
            })
            await sleep(120)
        }
        await sleep(3000)//停站中
        for(let i=0;i<15;i++){//火车向后加速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z+=0.07;    
            })
            await sleep(120)
        }
        
        await sleep(4500)//行驶中
        for(let i=0;i<15;i++){//火车向后减速
            world.querySelectorAll(".gb2").forEach((entity)=>{
                entity.velocity.z-=0.07;    
            })
            await sleep(120)
        }
        await sleep(3000)//停站中
  } })();
world.querySelectorAll(".gb2").forEach((entity)=>{
    entity.friction=1;    
})  

把速度调成0.07~

就可以哦~

点赞0


评论


游戏王者qwe柏拉图游戏王者qwe柏拉图

ok

点赞0


评论


Chara_juechuief_sChara_juechuief_s

86666666666666666666666

点赞0


评论


面具狐狸云绾兮面具狐狸云绾兮

是我急需的代码OWO

点赞0


评论


D453D453

伊子,想问下怎么建造火车啊?能帮忙吗?

点赞0


评论


圣世白羊圣世白羊

模型叫啥

点赞0


评论


HC洛天依HC洛天依

我一想创作。

点赞0


评论


QBZ_QBZ_

wawa

点赞0


评论


J_K_Hermione_build白泽J_K_Hermione_build白泽

尹子,能不能帮我见一见啊,谢谢

点赞0


评论


J_K_Hermione_build白泽J_K_Hermione_build白泽

链接:https://box3create.codemao.cn/games/0f0d1cf32d07dbeaaef4

点赞0


评论