用户:
build_一只建筑师吖查看:3 回复:5 评论:3 创建时间:2020-07-27T21:31:08

酷吧~
代码如下:
//玩家进入地图就会背上一个小书包
//准备步骤:将一个名为***的模型添加到地图上,再删掉
world.onPlayerJoin(({ entity }) => {
entity.player.addWearable({
bodyPart: Box3BodyPart.TORSO,
mesh: 'mesh/【旅行系列】背包.vb',
orientation: new Box3Quaternion(0, 1, 0, 0).rotateY(Math.PI/1),
scale: new Box3Vector3(0.5, 0.5, 0.5),
offset: new Box3Vector3(0, 0, -0.45),
});
});
world.onPlayerJoin(({ entity }) => {
entity.player.addWearable({
bodyPart: Box3BodyPart.TORSO,
mesh: 'mesh/喵-18.vb',
orientation: new Box3Quaternion(0, 1, 0, 0).rotateY(Math.PI/1),
scale: new Box3Vector3(1, 1, 0.5),
offset: new Box3Vector3(-0.5, 0, -0.1),
});
});
world.onPlayerJoin(({ entity }) => {
entity.player.addWearable({
bodyPart: Box3BodyPart.TORSO,
mesh: 'mesh/三级盔.vb',
orientation: new Box3Quaternion(0, 1, 0, 0).rotateY(Math.PI/-2),
scale: new Box3Vector3(1, 1, 1),
offset: new Box3Vector3(-0.1, 1, 0.1),
});
});
体验网址:
https://box3create.codemao.cn/games/5938f153b4fa5e91df00