用户:
ssss1457查看:6 回复:6 评论:6 创建时间:2022-03-24T15:34:59
求助武器试炼场的切换装备代码
world.onPlayerJoin(async({entity})=>{
entity.player.onPress(async({button,raycast})=>{
if(button == Box3ButtonType.ACTION1){
const result = await entity.player.dialog({
type: Box3DialogType.SELECT,
title: "武器",
options: ['',''],
})
if(!result || result === null){
return;
}
switch (result.index) {
case 0:
break;
default:
};
};
});
})点赞0
评论
entity.player.addWearable({
bodyPart: Box3BodyPart.LEFT_HAND,//穿戴部位,
mesh: 'mesh/模型.vb',//模型名
orientation: new Box3Quaternion(1, 1, 1, 1).rotateY(Math.PI/2),//四元数
scale: new Box3Vector3(1, 1, 1),//放大倍数
offset: new Box3Vector3(1, 1, 1),//位移
});
/*
建议先在地图中将模型调到想要的角度,然后复制模型四元数,粘贴到orientation
然后微调放大倍数和位移
*/
点赞0
评论