猫史档案馆


Robot一只屑代码师

Robot一只屑代码师

Lv.1

awq的一天

获赞:110收藏:17浏览:387作品收藏:6
回复帖子评论
上一页4 页 / 共 12下一页

21天已满,让吉吉喵看看都是谁有手就行 中回复

吉吉喵!不公平!我们都辛辛苦苦做的,还按照视频做了,你竟然还这样!!!我的主页:https://box3.codemao.cn/u/dyr00023   我奖状没有,但皮肤是要有的啊

2022-04-08T13:26:56 点赞:0

21天已满,让吉吉喵看看都是谁有手就行 中回复

吉吉喵!不公平!我们都辛辛苦苦做的,还按照视频做了,你竟然还这样!!!我的主页:https://box3.codemao.cn/u/dyr00023  我奖状没有,但皮肤是要有的啊

2022-04-08T13:56:57 点赞:0

【神岛创作节】一起来二创叠buff,比赛进入倒计时~ 中回复

# 二创活动

2022-04-08T14:06:31 点赞:0

关于编程猫皮肤... 中回复

imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E7%BF%BB%E7%99%BD%E7%9C%BC.gif"alt="emotion_编程猫_翻白眼"

2022-04-08T14:09:45 点赞:0

关于编程猫皮肤... 中回复

https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E7%BF%BB%E7%99%BD%E7%9C%BC.gif

2022-04-08T14:10:33 点赞:0

546586 中回复

???

2022-04-08T15:58:56 点赞:0

21天已满,让吉吉喵看看都是谁有手就行 中回复

center_image

我数了就17个

2022-04-08T17:00:14 点赞:0

【神岛创作节】一起来二创叠buff,比赛进入倒计时~ 中回复

谁有链接合作

2022-04-11T10:09:52 点赞:0

求助!怎么碰到模型就会喵 中回复

喵 = 死

2022-04-11T12:06:14 点赞:0

神器代码岛?这问题咋解决? 中回复

center_image

2022-04-11T14:20:17 点赞:2

这一天,你正在玩BOX3,突然一阵‘滋滋’声,网断了。弹出来一个窗口,你点了进去······ 中回复

作者,我是模型喵,我权限捏

2022-04-11T21:21:31 点赞:0

关于神奇代码岛接入实名认证的公告 中回复

center_image

2022-04-12T10:48:50 点赞:0

如何拥有全岛独一无二的皮肤? 中回复

center_image

2022-04-12T10:50:08 点赞:0

关于神奇代码岛接入实名认证的公告 中回复

沙发!

2022-04-12T10:52:49 点赞:0

关于神奇代码岛接入实名认证的公告 中回复

吉吉,没认证玩得了地图吗

2022-04-12T15:05:51 点赞:0

【趣味巨人屋】趣味巨人屋发布啦 中回复

蜱虫()

2022-04-12T15:15:12 点赞:0

把大象放进冰箱里需要几步? 中回复

3步(打开,放进去,关上)

2022-04-12T15:16:45 点赞:0

【趣味巨人屋】趣味巨人屋发布啦 中回复

考古

2022-04-12T15:47:09 点赞:0

无条件加入哦。 中回复

我我我

2022-04-12T15:47:35 点赞:1

【神奇代码岛】火车站地图招人拉 中回复

二创吗

2022-04-12T15:48:58 点赞:0

二创活动招人 中回复

申请了

2022-04-12T15:59:27 点赞:0

【今天不整活】阿吉向你发出不触屏挑战邀请,来吗? 中回复

难不倒我,就这~

2022-04-13T18:52:54 点赞:0

汽车教程!👏👏👏👏 中回复

world.onPress(({ button, raycast }) => {
if (button === 'crouch') {
const origincar = entity;

//车
world.createEntity({
id: "car",
mesh: origincar.mesh,
mass: origincar.mass,
friction: origincar.friction,
position: origincar.position,
meshScale: origincar.meshScale,
restitution: origincar.restitution,
meshOrientation: origincar.meshOrientation,
collides: true,
gravity: true,
fixed: true,
})
//world.createEntity(car);

entity.mesh = originPlayerMesh
entity.player.invisible = false;//人物变为原来 注意顺序
}
})

4.完整代码实现

world.onPlayerJoin(({ entity }) => {//当玩家进入时
/
const originPlayerMesh = entity.mesh;//玩家
world.onInteract(({ entity, targetEntity }) => {


if (targetEntity.mesh.match("car") != 0) {
entity.mesh = targetEntity.mesh;//玩家模型变成车
entity.meshScale = targetEntity.meshScale;//大小一致
entity.meshOrientation = targetEntity.meshOrientation;
entity.position = targetEntity.position;//位置
targetEntity.destroy();//原来的车销毁
entity.player.invisible = true;
}

});
///上车
world.onPress(({ button, raycast }) => {
if (button === 'crouch') {
const origincar = entity;

//车
world.createEntity({
id: "car",
mesh: origincar.mesh,
mass: origincar.mass,
friction: origincar.friction,
position: origincar.position,
meshScale: origincar.meshScale,
restitution: origincar.restitution,
meshOrientation: origincar.meshOrientation,
collides: true,
gravity: true,
fixed: true,
})
//world.createEntity(car);

entity.mesh = originPlayerMesh
entity.player.invisible = false;//人物变为原来 注意顺序
}
})

})
world.onEntityCreate(({ entity }) => {//此时的entity的模型为载具
if (entity.mesh.match("car") != 0) {
//console.log("是车");
entity.enableInteract = true; // 开启实体互动功能
entity.interactRadius = 8; // 互动范围大小
}
})
world.onEntityContact(({ entity, other }) => {//当一个实体碰撞到另一个实体时

})

2022-04-15T11:43:43 点赞:0

汽车教程!👏👏👏👏 中回复

完整的

world.onPlayerJoin(({ entity }) => {//当玩家进入时
/
const originPlayerMesh = entity.mesh;//玩家
world.onInteract(({ entity, targetEntity }) => {


if (targetEntity.mesh.match("car") != 0) {
entity.mesh = targetEntity.mesh;//玩家模型变成车
entity.meshScale = targetEntity.meshScale;//大小一致
entity.meshOrientation = targetEntity.meshOrientation;
entity.position = targetEntity.position;//位置
targetEntity.destroy();//原来的车销毁
entity.player.invisible = true;
}

});
///上车
world.onPress(({ button, raycast }) => {
if (button === 'crouch') {
const origincar = entity;

//车
world.createEntity({
id: "car",
mesh: origincar.mesh,
mass: origincar.mass,
friction: origincar.friction,
position: origincar.position,
meshScale: origincar.meshScale,
restitution: origincar.restitution,
meshOrientation: origincar.meshOrientation,
collides: true,
gravity: true,
fixed: true,
})
//world.createEntity(car);

entity.mesh = originPlayerMesh
entity.player.invisible = false;//人物变为原来 注意顺序
}
})

})
world.onEntityCreate(({ entity }) => {//此时的entity的模型为载具
if (entity.mesh.match("car") != 0) {
//console.log("是车");
entity.enableInteract = true; // 开启实体互动功能
entity.interactRadius = 8; // 互动范围大小
}
})
world.onEntityContact(({ entity, other }) => {//当一个实体碰撞到另一个实体时

})

2022-04-15T11:45:12 点赞:1

希望吉吉喵能关注一下 中回复

啊对对对

2022-04-15T11:49:13 点赞:0

一个远距离射击代码 中回复

world.onPlayerJoin(({ entity }) => {     entity.enableDamage = true;     entity.player.onPress(({ button, raycast: { hitEntity, direction } }) => {         if (button !== 'action0' || !hitEntity) {             return;         }         hitEntity.velocity.x += direction.x;         hitEntity.velocity.y += 0.3;         hitEntity.velocity.z += direction.z;         hitEntity.hurt(10 * Math.random() + 10, {             attacker: entity,         });     }); });

 

world.onDie(({ entity, attacker }) => {     if (attacker) {         world.say(attacker.player.name + '击杀 ' + entity.player.name)     }     entity.player.forceRespawn(); })

2022-04-15T11:49:50 点赞:0

球球大作战招人啦 中回复

我捏

2022-04-15T11:59:57 点赞:0

急需招募BOX3代码师和建造师。 中回复

我申请了.........................................................e

2022-04-15T12:03:50 点赞:0

谁创作节招人 中回复

..............

2022-04-15T12:04:26 点赞:0

谁创作节招人 中回复


顶顶
顶顶顶
顶顶顶顶
顶顶顶顶顶
顶顶喵再顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶
顶顶顶顶顶
顶顶顶顶
顶顶顶
顶顶
顶顶
顶顶
顶顶顶
顶顶顶顶
顶顶顶顶顶
顶顶喵再顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶
顶顶顶顶顶
顶顶顶顶
顶顶顶
顶顶
顶顶
顶顶
顶顶顶
顶顶顶顶
顶顶顶顶顶
顶顶喵再顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶
顶顶顶顶顶
顶顶顶顶
顶顶顶
顶顶
顶顶
顶顶
顶顶顶
顶顶顶顶
顶顶顶顶顶
顶顶喵再顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶
顶顶顶顶顶
顶顶顶顶
顶顶顶
顶顶

2022-04-15T12:04:36 点赞:0