用户:
Hacker查看:1 回复:1 评论:1 创建时间:2023-08-30T17:08:27
在线等,挺急的(求求了明天我没空)
//你以这个为参考))
vname = []//破坏方块的名称
world.onPress(({ button,raycast: { voxelIndex,normal,hitVoxel,distance}})=>{;
if(hitVoxel==0)return
if(voxels.name(hitVoxel) in vname && distance<=5){
if (button == Box3ButtonType.ACTION0){
let v = voxelIndex.add(normal);
voxels.setVoxel(v.x,v.y-1,v.z, '');//破坏方块
}
}
});点赞1
评论