用户:
hecos查看:2 回复:8 评论:2 创建时间:2020-04-30T11:08:01
world.querySelectorAll('.test').forEach((e)=>{
var type='p';
world.onTick(()=>{
if(e.meshOrientation.x>=0.5){
e.meshOrientation.x-=0.1;
type='m';
} else if(e.meshOrientation.x<=-0.5){
e.meshOrientation.x+=0.1;
type='p';
} else{
if(type==='p'){
e.meshOrientation.x+=0.1;
} else{
e.meshOrientation.x-=0.1;
}
}
})
})
实体AI博物馆传送门:https://box3create.codemao.cn/games/15e1ac8436ac2609166e