Zwischenstand

This commit is contained in:
2026-10-22 08:15:41 +02:00
parent 60741d3116
commit 238776cfde
12 changed files with 27 additions and 23 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -1,4 +1,4 @@
#Mon Oct 12 14:17:44 CEST 2026
#Mon Oct 19 14:39:04 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
attachedSounds.count=0

View File

@@ -1,4 +1,4 @@
#Thu Oct 15 15:05:26 CEST 2026
#Mon Oct 19 14:39:11 CEST 2026
attachedEmitters.count=0
attachedLights.count=0
attachedSounds.count=0

View File

@@ -12,13 +12,13 @@
"damage": 50,
"grip": {
"posX": 0.10248406,
"posY": 0.104730606,
"posY": 0.10473058,
"posZ": 0.4630257,
"rotX": 0.0,
"rotY": 0.0,
"rotZ": 0.0,
"grip2PosX": 0.0024840608,
"grip2PosY": 0.104730606,
"grip2PosY": 0.10473058,
"grip2PosZ": 0.6630257,
"handOffsetX": 0.0,
"handOffsetY": 0.0,

View File

@@ -12,8 +12,8 @@
"damage": 0,
"grip": {
"posX": 0.1114975,
"posY": 0.07676052,
"posZ": -0.27503356,
"posY": 0.07795838,
"posZ": 0.36503196,
"rotX": 0.0,
"rotY": 0.0,
"rotZ": 0.0,

View File

@@ -1,8 +1,8 @@
{
"SWORD": {
"handOffX": 0.105,
"handOffY": 0.1,
"handOffZ": 0.5,
"handOffX": 0.095,
"handOffY": 0.045,
"handOffZ": 0.645,
"hand2OffX": 0.0,
"hand2OffY": 0.0,
"hand2OffZ": 0.0

View File

@@ -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);

View File

@@ -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();

View File

@@ -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. */

View File

@@ -225,7 +225,10 @@ public class WeaponAttachmentControl extends AbstractControl {
Quaternion animDelta = (handBindRotInChar != null)
? boneRotInChar.mult(handBindRotInChar.inverse())
: boneRotInChar;
boolean bladeAtMinusZ2 = grip != null && grip.getGrip2PosZ() != 0f && grip.getGrip2PosZ() > grip.getPosZ();
boolean bladeAtMinusZ2 = grip != null && (
(grip.getGrip2PosX() != 0f || grip.getGrip2PosY() != 0f || grip.getGrip2PosZ() != 0f)
? grip.getGrip2PosZ() > grip.getPosZ()
: grip.getPosZ() > 0f);
Quaternion bladeFlip2 = bladeAtMinusZ2
? new Quaternion().fromAngles(com.jme3.math.FastMath.PI, 0f, 0f)
: new Quaternion();
@@ -369,7 +372,10 @@ public class WeaponAttachmentControl extends AbstractControl {
DEG_TO_RAD * grip.getRotY(),
DEG_TO_RAD * grip.getRotZ())
: new Quaternion();
boolean bladeAtMinusZ = grip != null && grip.getGrip2PosZ() != 0f && grip.getGrip2PosZ() > grip.getPosZ();
boolean bladeAtMinusZ = grip != null && (
(grip.getGrip2PosX() != 0f || grip.getGrip2PosY() != 0f || grip.getGrip2PosZ() != 0f)
? grip.getGrip2PosZ() > grip.getPosZ()
: grip.getPosZ() > 0f);
Quaternion bladeFlip = bladeAtMinusZ
? new Quaternion().fromAngles(com.jme3.math.FastMath.PI, 0f, 0f)
: new Quaternion();