
Lv.1
awq的一天
在 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
在 关于编程猫皮肤... 中回复
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
在 汽车教程!👏👏👏👏 中回复
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
在 一个远距离射击代码 中回复
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
在 急需招募BOX3代码师和建造师。 中回复
我申请了.........................................................e
2022-04-15T12:03:50 点赞:0
在 谁创作节招人 中回复
顶
顶顶
顶顶顶
顶顶顶顶
顶顶顶顶顶
顶顶喵再顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶
顶顶顶顶顶
顶顶顶顶
顶顶顶
顶顶
顶顶
顶顶
顶顶顶
顶顶顶顶
顶顶顶顶顶
顶顶喵再顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶
顶顶顶顶顶
顶顶顶顶
顶顶顶
顶顶
顶顶
顶顶
顶顶顶
顶顶顶顶
顶顶顶顶顶
顶顶喵再顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶
顶顶顶顶顶
顶顶顶顶
顶顶顶
顶顶
顶顶
顶顶
顶顶顶
顶顶顶顶
顶顶顶顶顶
顶顶喵再顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶顶顶顶
顶顶顶顶顶顶顶
顶顶顶顶顶顶
顶顶顶顶顶
顶顶顶顶
顶顶顶
顶顶
顶
2022-04-15T12:04:36 点赞:0