猫史档案馆


【岛3】怎么将自己变成模型

用户:SL大蔡超神喵SL大蔡超神喵查看:1 回复:5 评论:1 创建时间:2020-10-25T11:46:33


怎么将自己变成模型啊?把代码发给我,各位大佬!求求各位大佬了!


回复

上一页1 页 / 共 1下一页
该账号已停用该账号已停用

//选中所有带有标签“模型”的实体,并遍历循环.
world.querySelectorAll('.模型').forEach((e) => {
    e.onEntityContact(({ entity, other }) => {  //设置目标模型的碰撞事件.
        if (!other.isPlayer) { return } //防止非玩家实体参与检测.
        other.mesh = entity.mesh;  //设置玩家的外观.
        other.meshScale = entity.meshScale;  //设置玩家外观缩放比例.
        other.meshOrientation = new Box3Quaternion(0, 0, 0, 1).rotateY(Math.PI / 1);
        other.player.invisible = true;  //如果模型比玩家小,就需要隐藏玩家的皮肤.
    })
})

点赞0


评论


SL大蔡超神喵SL大蔡超神喵

//选中所有带有标签“模型”的实体,并遍历循环.
world.querySelectorAll('.模型').forEach((e) => {
    e.onEntityContact(({ entity, other }) => {  //设置目标模型的碰撞事件.
        if (!other.isPlayer) { return } //防止非玩家实体参与检测.
        other.mesh = entity.mesh;  //设置玩家的外观.
        other.meshScale = entity.meshScale;  //设置玩家外观缩放比例.
        other.meshOrientation = new Box3Quaternion(0, 0, 0, 1).rotateY(Math.PI / 1);
        other.player.invisible = true;  //如果模型比玩家小,就需要隐藏玩家的皮肤.
    })
})

点赞0


评论


SL大蔡超神喵SL大蔡超神喵

//选中所有带有标签“模型”的实体,并遍历循环.
world.querySelectorAll('.模型').forEach((e) => {
    e.onEntityContact(({ entity, other }) => {  //设置目标模型的碰撞事件.
        if (!other.isPlayer) { return } //防止非玩家实体参与检测.
        other.mesh = entity.mesh;  //设置玩家的外观.
        other.meshScale = entity.meshScale;  //设置玩家外观缩放比例.
        other.meshOrientation = new Box3Quaternion(0, 0, 0, 1).rotateY(Math.PI / 1);
        other.player.invisible = true;  //如果模型比玩家小,就需要隐藏玩家的皮肤.
    })
})

点赞0


评论


斡

/选中所有带有标签“模型”的实体,并遍历循环.
world.querySelectorAll('.模型').forEach((e) => {
    e.onEntityContact(({ entity, other }) => {  //设置目标模型的碰撞事件.
        if (!other.isPlayer) { return } //防止非玩家实体参与检测.
        other.mesh = entity.mesh;  //设置玩家的外观.
        other.meshScale = entity.meshScale;  //设置玩家外观缩放比例.
        other.meshOrientation = new Box3Quaternion(0, 0, 0, 1).rotateY(Math.PI / 1);
        other.player.invisible = true;  //如果模型比玩家小,就需要隐藏玩家的皮肤.
    })
})

点赞0


评论


是要输入模型名称变成模型???

点赞0


评论