调整obb命名
This commit is contained in:
parent
35652ebe98
commit
6bf2a61e7c
4 changed files with 5 additions and 4 deletions
|
@ -63,7 +63,7 @@ public class LaserTowerRenderer extends GeoEntityRenderer<LaserTowerEntity> {
|
|||
bone.setHidden(!pCamera.isVisible(aabb));
|
||||
}
|
||||
|
||||
if (name.equals("turret") || name.equals("turret2")) {
|
||||
if (name.equals("isPart") || name.equals("turret2")) {
|
||||
bone.setRotY(-Mth.lerp(partialTick, animatable.yRotO, animatable.getYRot()) * Mth.DEG_TO_RAD);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class Yx100Renderer extends GeoEntityRenderer<Yx100Entity> {
|
|||
}
|
||||
}
|
||||
|
||||
if (name.equals("turret")) {
|
||||
if (name.equals("isPart")) {
|
||||
bone.setRotY(Mth.lerp(partialTick, animatable.turretYRotO, animatable.getTurretYRot()) * Mth.DEG_TO_RAD);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public class OBBRenderer {
|
|||
Vector3f halfExtents = obb.extents();
|
||||
Quaternionf rotation;
|
||||
|
||||
if (obb.turret()) {
|
||||
if (obb.isPart()) {
|
||||
rotation = VectorTool.combineRotationsTurret(pPartialTicks, entity);
|
||||
} else {
|
||||
rotation = VectorTool.combineRotations(pPartialTicks, entity);
|
||||
|
|
|
@ -15,8 +15,9 @@ import java.util.Optional;
|
|||
* @param center 旋转中心
|
||||
* @param extents 三个轴向上的半长
|
||||
* @param rotation 旋转
|
||||
* @param isPart 是否为子部件,一般用于炮塔
|
||||
*/
|
||||
public record OBB(Vector3f center, Vector3f extents, Quaternionf rotation, boolean turret) {
|
||||
public record OBB(Vector3f center, Vector3f extents, Quaternionf rotation, boolean isPart) {
|
||||
|
||||
public void setCenter(Vector3f center) {
|
||||
this.center.set(center);
|
||||
|
|
Loading…
Add table
Reference in a new issue