调整动画

This commit is contained in:
Atsuihsio 2024-08-03 11:11:44 +08:00
parent 0837dbdb48
commit acc6215fd2
6 changed files with 38 additions and 29 deletions

View file

@ -50,7 +50,7 @@ public class Glock17ItemModel extends GeoModel<Glock17Item> {
gun.setPosZ(5f * (float) p + (float) (0.3f * zp));
gun.setScaleZ(1f - (0.5f * (float) p));
gun.setScaleZ(1f - (0.35f * (float) p));
gun.setRotZ(-11 * Mth.DEG_TO_RAD * (float) p + (float) (0.05f * zp));
@ -58,14 +58,14 @@ public class Glock17ItemModel extends GeoModel<Glock17Item> {
double fr = player.getPersistentData().getDouble("fire_rot");
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
shen.setPosY(0.05f * (float) (fp + 2 * fr));
shen.setPosZ(-0.05f * (float) (fp + 0.54f * fr));
shen.setPosY(0.03f * (float) (fp + 2 * fr));
shen.setPosZ(2.6f * (float) (fp + 0.84f * fr));
shen.setRotY(0.05f * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
shen.setRotX(-0.05f * (float) (fp + fr));
shen.setRotX(0.005f * (float) (fp + fr));
} else {
shen.setPosY(0.08f * (float) (fp + 2 * fr));
shen.setPosZ(0.9f * (float) (fp + 0.54f * fr));
shen.setRotX(0.27f * (float) (0.18f * fp + fr));
shen.setPosZ(1.9f * (float) (fp + 0.54f * fr));
shen.setRotX(0.17f * (float) (0.18f * fp + fr));
shen.setRotY(0.1f * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
}

View file

@ -58,7 +58,7 @@ public class Glock18ItemModel extends GeoModel<Glock18Item> {
gun.setPosZ(5f * (float) p + (float) (0.3f * zp));
gun.setScaleZ(1f - (0.5f * (float) p));
gun.setScaleZ(1f - (0.35f * (float) p));
gun.setRotZ(-11 * Mth.DEG_TO_RAD * (float) p + (float) (0.05f * zp));
@ -66,14 +66,14 @@ public class Glock18ItemModel extends GeoModel<Glock18Item> {
double fr = player.getPersistentData().getDouble("fire_rot");
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
shen.setPosY(0.05f * (float) (fp + 2 * fr));
shen.setPosZ(-0.05f * (float) (fp + 0.54f * fr));
shen.setPosY(0.03f * (float) (fp + 2 * fr));
shen.setPosZ(2.6f * (float) (fp + 0.84f * fr));
shen.setRotY(0.05f * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
shen.setRotX(-0.05f * (float) (fp + fr));
shen.setRotX(0.005f * (float) (fp + fr));
} else {
shen.setPosY(0.08f * (float) (fp + 2 * fr));
shen.setPosZ(0.9f * (float) (fp + 0.54f * fr));
shen.setRotX(0.27f * (float) (0.18f * fp + fr));
shen.setPosZ(1.9f * (float) (fp + 0.54f * fr));
shen.setRotX(0.17f * (float) (0.18f * fp + fr));
shen.setRotY(0.1f * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
}

View file

@ -160,9 +160,29 @@
},
"animation.glock.fire": {
"loop": "hold_on_last_frame",
"animation_length": 0.0833,
"animation_length": 0.0417,
"override_previous_animation": true,
"bones": {
"0": {
"rotation": {
"0.0": {
"vector": [-5, 0, 0]
},
"0.0417": {
"vector": [0, 0, 0],
"easing": "easeInElastic"
}
},
"position": {
"0.0": {
"vector": [0, 0, 0.5]
},
"0.0417": {
"vector": [0, 0, 0],
"easing": "easeInElastic"
}
}
},
"lun": {
"rotation": {
"0.0": {
@ -180,17 +200,6 @@
"vector": [0, 0, 0]
}
}
},
"roll": {
"rotation": {
"0.0": {
"vector": [-5, 0, 0]
},
"0.0833": {
"vector": [0, 0, 0],
"easing": "easeInElastic"
}
}
}
}
},

View file

@ -35,7 +35,7 @@
"translation": [
-8.25,
1.25,
-0.75
-2.75
]
},
"firstperson_lefthand": {

View file

@ -2,8 +2,8 @@
"zoom_speed": 1.9,
"zoom": 1.25,
"dev": 2.5,
"recoil_x": 0.007,
"recoil_y": 0.023,
"recoil_x": 0.004,
"recoil_y": 0.013,
"damage": 5.5,
"headshot": 1.5,
"velocity": 16,

View file

@ -2,8 +2,8 @@
"zoom_speed": 1.9,
"zoom": 1.25,
"dev": 2.5,
"recoil_x": 0.007,
"recoil_y": 0.023,
"recoil_x": 0.004,
"recoil_y": 0.013,
"damage": 5.5,
"headshot": 1.5,
"velocity": 16,