
Lv.1
签名:我正在告诉你我在做什么
在 up计划第一期创作倒计时两个小时,加油! 中回复
吉吉,请求审核https://box3.codemao.cn/e/2dc3d5c528cfac6abc72,我已更新了3次,但是现在初稿还没有审核出来imgsrc="http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f8/hongyun_thumb.gif"alt="emotion_青啤鸿运当头"
2022-01-22T19:15:20 点赞:0
在 up计划第一期创作倒计时两个小时,加油! 中回复
for(x = 0;x<127;x++){
for(y = 0;y<8;y++){
for(z = 0;z<127;z++){
voxsles.setVoxle(x,y,z,0)//这是把0,0,0到127,8,127之间所有方块都清除掉(变
//成空气)
}
}
}
这里x,y,z的取值不定,但是要记住,在
for(i = 0;i<127;i++)
中i=127的那一次似乎是不执行的
2022-01-22T19:23:18 点赞:0
在 山谷湖泊设定错误 中回复
h t t p s : / / i m g t u . c o m / i / b v u N 6 K 这是链接1; --------------------------------------------------------------------------- h t t p s : / / i m g t u . c o m / i / b v u Y S x 这是链接2; --------------------------------------------------------------------------- h t t p s : / / i m g t u . c o m / i / b v u t l 6 这是第三个链接。 --------------------------------------------------------------------------- 得益于发帖的功能,无法显示图片,敬请谅解。
2022-03-15T14:33:35 点赞:0
在 关于神奇代码岛接入实名认证的公告 中回复
吉吉,我在姓名里填写了假名,身份证号不做假,通过了,名字和身份证号不应该需要统一吗?我请求重新填写一下()
还有请吉吉维修一下()
2022-04-12T08:24:34 点赞:0
在 【岛三教程】跟着玩家视角的飞机,还会加减速? 中回复
c喵t ITEM = require("./plane.js")
function drive1(entity) {
let angle1 = eintity.direction;
if (angle1 < 0) {
angle1 = PI2 + angle1;
}
if (entity.angle < 0) {
entity.angle = PI2 + entity.angle;
} entity.angle %= PI2;
c喵t angle2 = entity.angle;
if (Math.min(Math.abs(angle1 - angle2), Math.abs(PI2 - angle1 + angle2)) < 0.1) {
entity.angle = entity.direction;
return undefined;
}
else {
if (angle1 > angle2) {
if (angle1 - angle2 < Math.PI) {
entity.angle += 0.1;
return 0;
}
else {
entity.angle -= 0.1;
return 1;
}
}
else {
if (angle1 + (PI2 - angle2) < Math.PI) {
entity.angle += 0.1;
return 0;
}
else {
entity.angle -= 0.1;
return 1;
}
}
}
}
c喵t PI2 = Math.PI * 2;
c喵t PI3 = Math.PI * 0.5
c喵ole.clear()
c喵t planes = [];
world.onPlayerJoin(({entity}) => {
c喵t plane = world.createEntity({
mesh: ITEM[entity.plane].wear[0],
collides: true,
gravity: false,
position: new Box3Vector3(64, 64, 64),
meshScale: new Box3Vector3(0.08, 0.08, 0.08),
});
entity.pl = plane
plane.angle = 0;
plane.direction = 0;
plane.rotateX = 0;
planes.push(plane)
entity.up = 0;
plane.speed = 1
plane.position.set(60, 21, 76)
plane.maxspeed = ITEM[entity.plane].speed;
plane.rotateZ = 0;
plane.angle = Math.atan2(entity.player.facingDirection.z,entity.player.facingDirection.x);
entity.player.cameraEntity = plane
entity.player.invisible = true
entity.removeTag('player')
entity.fly = false
entity.player.canFly = true
entity.player.showName = false;
})
Q = ITEM[entity.plane].wear[1]
entity.plane_Quat = new Box3Quaternion(Q[0], Q[1], Q[2], Q[3]);
entity.addTag('fly');
world.onTick(({ tick }) => {
world.querySelectorAll('.fly').forEach((x) => {
drive(x, x.pl)
})
})
async function drive(entity, plane){
entity.up = entity.player.cameraPitch;
if (entity.player.walkState == Box喵layerWalkState.RUN) {
if (plane.speed < plane.maxspeed) {
plane.speed += 0.05
}
}
else {
if (plane.speed > 1)
{
plane.speed -= 0.05
}
}
plane.onVoxelContact(({entity}) => {
plane.speed = 0.05
})
plane.direction = Math.atan2(entity.player.facingDirection.z, entity.player.facingDirection.x)
c喵t num = drive1(plane);
if (num === 1) {
if (plane.rotateZ < 1) {//在这段代码中,-1和1为飞机转弯系数,系数越大能力越好
plane.rotateZ += 0.1
}
else {
plane.rotateZ = 1;
}
}
else if (num === 0){
if (plane.rotateZ > -1){
plane.rotateZ -= 0.1
}
else {
plane.rotateZ = -1;
}
}
else if (num == undefined ){
plane.rotateZ *= 0.95;
}
plane.velocity.set(Math.cos(plane.angle) * Math.cos(entity.up) * plane.speed, -Math.sin(entity.up) * plane.speed, Math.sin(plane.angle) * Math.cos(entity.up) * plane.speed);
plane.meshOrientation = entity.plane_Quat.rotateY(PI3).rotateZ(plane.rotateZ).rotateX(-entity.up).rotateY(plane.angle);
}2022-04-20T14:35:08 点赞:0