猫史档案馆


求助QWQ 大佬们(JS)这个咋做啊!

用户:BlackShadowBlackShadow查看:14 回复:3 评论:14 创建时间:2022-12-18T12:41:54


就是人物喵后的坐标会生成个箱子,这个我不会a(我又来问了求助QWQ)


回复

上一页1 页 / 共 1下一页
名探酱名探酱

const buddy = world.createEntity({
            mesh: 'mesh/箱子.vb',
            position: [entity.poistion.x,entity.poistion.y,entity.poistion.z],
            meshScale: [1,1,1],
            gravity: true,//重力,如不开启碰撞就是false
            fixed: false,
            collides: true,//碰撞(不开启填false)
            friction: 1,
            mass: 1,
        })

点赞0


评论


伴雪纷飞伴雪纷飞

//玩家喵/亡事件 
world.onDie(async({entity})=>{ 
  if(!entity.isPlayer)return;//不处理非玩家的喵事件 
  world.createEntity({//创建箱子 
    mesh:'mesh/箱子.vb', 
    position:entity.position, 
}) }); 

点赞0


评论


伴雪纷飞伴雪纷飞

//玩家死/亡事件 
world.onDie(async({entity})=>{ 
  if(!entity.isPlayer)return;//不处理非玩家的喵事件 
  world.createEntity({//创建箱子 
    mesh:'mesh/箱子.vb', 
    position:entity.position,
    meshScale: [2,2,2],//缩放比例 这里是长宽高同时*2
    gravity: true,//你要的重力
    fixed: false,//你要的不能移动
    collides: true,//你要的碰撞(多了会卡)
}) }); 

点赞1


评论