Zwischenstand
This commit is contained in:
@@ -174,7 +174,7 @@ public class EditorApp extends Application {
|
||||
animPreviewController = new de.blight.editor.toolset.anim.AnimPreviewController(toolCtx);
|
||||
animSetController = new de.blight.editor.toolset.anim.AnimSetController(toolCtx);
|
||||
objectController = new de.blight.editor.toolset.object.ObjectController(toolCtx);
|
||||
modelEditorController = new de.blight.editor.toolset.model.ModelEditorController(toolCtx, () -> assetController.openOverlay());
|
||||
modelEditorController = new de.blight.editor.toolset.model.ModelEditorController(toolCtx, () -> { assetController.openOverlay(); assetController.expandModelsNode(); });
|
||||
modelEditorController.setObjectController(objectController);
|
||||
atmosphereController = new de.blight.editor.toolset.atmosphere.AtmosphereController(toolCtx);
|
||||
waterController = new de.blight.editor.toolset.water.WaterController(toolCtx);
|
||||
|
||||
@@ -1551,7 +1551,7 @@ public class ModelEditorState extends BaseAppState {
|
||||
|
||||
// Schritt 3: Richtung A→B auf +Z ausrichten
|
||||
Vector3f bladeDir = B.subtract(A).normalizeLocal();
|
||||
if (bladeDir.z < 0) bladeDir.negateLocal(); // +Z-Richtung bevorzugen
|
||||
if (bladeDir.z > 0) bladeDir.negateLocal(); // -Z-Richtung bevorzugen
|
||||
Quaternion rot1 = awRotateToZ(bladeDir);
|
||||
|
||||
// Mitte der Hauptachse → Ursprung
|
||||
@@ -1609,11 +1609,11 @@ public class ModelEditorState extends BaseAppState {
|
||||
float guardNorm = (float) guardBucket / (BKTS - 1);
|
||||
log.info("[ModelEditor] AlignWeapon: Parierstange bei normZ={} (Bucket {}/{})",
|
||||
String.format("%.2f", guardNorm), guardBucket, BKTS);
|
||||
if (guardNorm > 0.5f) {
|
||||
// Parierstange in +Z-Hälfte → Pommel bei +Z, Klinge bei -Z → 180° um X flippen
|
||||
if (guardNorm < 0.5f) {
|
||||
// Parierstange in -Z-Hälfte → Pommel bei -Z, Klinge bei +Z → 180° um X flippen
|
||||
Quaternion flip = new Quaternion().fromAngles(FastMath.PI, 0f, 0f);
|
||||
combined = flip.mult(combined);
|
||||
log.info("[ModelEditor] AlignWeapon: Pommel bei +Z detektiert → Schwert geflippt");
|
||||
log.info("[ModelEditor] AlignWeapon: Pommel bei -Z detektiert → Schwert geflippt");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2156,8 +2156,9 @@ public class ModelEditorState extends BaseAppState {
|
||||
float g2x = input.gripEditorGrip2PosX;
|
||||
float g2y = input.gripEditorGrip2PosY;
|
||||
float g2z = input.gripEditorGrip2PosZ;
|
||||
boolean bladeAtMinusZ = g2z > g1z;
|
||||
boolean isTwoHand = bladeAtMinusZ && (g2x != 0f || g2y != 0f || g2z != 0f);
|
||||
boolean hasGrip2 = g2x != 0f || g2y != 0f || g2z != 0f;
|
||||
boolean bladeAtMinusZ = hasGrip2 ? (g2z > g1z) : (g1z > 0f);
|
||||
boolean isTwoHand = hasGrip2 && bladeAtMinusZ;
|
||||
|
||||
Quaternion charWorldRot = charPreviewNode.getWorldRotation();
|
||||
Quaternion charWorldRotInv = charWorldRot.inverse();
|
||||
|
||||
@@ -277,11 +277,8 @@ public class ModelEditorController implements ToolController {
|
||||
public void openModelEditor(String relPath, Path absolutePath) {
|
||||
this.pendingRelPath = relPath;
|
||||
this.pendingAbsPath = absolutePath;
|
||||
if (ctx.registry().getActive() == this) {
|
||||
activate();
|
||||
} else {
|
||||
ctx.registry().activate(this);
|
||||
}
|
||||
ctx.switchToWorld().run();
|
||||
ctx.registry().activate(this);
|
||||
}
|
||||
|
||||
/** Öffnet den Datei-Dialog für den Modell-Import. */
|
||||
|
||||
Reference in New Issue
Block a user