Einige Bugs was Platzieren und Interagieren mit Interactables belangt, behoben
This commit is contained in:
@@ -451,8 +451,14 @@ public class SceneObjectState extends BaseAppState {
|
||||
|
||||
// Property-Änderungen (Position, Rotation, Textur, Solid)
|
||||
SharedInput.ObjectPropertyChange prop;
|
||||
boolean propChanged = false;
|
||||
while ((prop = input.objectPropertyQueue.poll()) != null) {
|
||||
handlePropertyChange(prop);
|
||||
propChanged = true;
|
||||
}
|
||||
if (propChanged) {
|
||||
refreshBedArrow();
|
||||
refreshBenchArrow();
|
||||
}
|
||||
|
||||
// Löschen
|
||||
@@ -830,10 +836,10 @@ public class SceneObjectState extends BaseAppState {
|
||||
float ox = meta.interactableOffsetX();
|
||||
float oy = meta.interactableOffsetY();
|
||||
float oz = meta.interactableOffsetZ();
|
||||
float wx2 = wx + ox * cos - oz * sin;
|
||||
float wx2 = wx + ox * cos + oz * sin;
|
||||
float wy2 = wy + placementOffY + oy;
|
||||
float wz2 = wz + ox * sin + oz * cos;
|
||||
float roty2 = rotY + meta.interactableRotY();
|
||||
float wz2 = wz - ox * sin + oz * cos;
|
||||
float roty2 = meta.interactableRotY() - rotY;
|
||||
if (meta.interactableType() == de.blight.common.model.InteractableType.BED) {
|
||||
Bed bed = new Bed();
|
||||
bed.setLiegeX(wx2); bed.setLiegeY(wy2); bed.setLiegeZ(wz2);
|
||||
@@ -1204,7 +1210,8 @@ public class SceneObjectState extends BaseAppState {
|
||||
|
||||
private void updateTerrainLevelIndicator() {
|
||||
if (terrainRingNode == null) return;
|
||||
if (selectedIndices.isEmpty() || input.activeLayer != SharedInput.LAYER_OBJECTS_EDIT) {
|
||||
if (selectedIndices.isEmpty() || input.activeLayer != SharedInput.LAYER_OBJECTS_EDIT
|
||||
|| input.objectEditTool == SharedInput.EDIT_TOOL_ROTATE) {
|
||||
terrainRingNode.setCullHint(Spatial.CullHint.Always);
|
||||
terrainStickNode.setCullHint(Spatial.CullHint.Always);
|
||||
return;
|
||||
@@ -1898,6 +1905,8 @@ public class SceneObjectState extends BaseAppState {
|
||||
clearSubSelection();
|
||||
activeGizmo = -1;
|
||||
updateGizmoVisibility();
|
||||
hideBedArrow();
|
||||
hideBenchArrow();
|
||||
input.selectedObjectInfo = null;
|
||||
input.objectSelectionChanged = true;
|
||||
|
||||
@@ -1940,10 +1949,10 @@ public class SceneObjectState extends BaseAppState {
|
||||
float oy = meta.interactableOffsetY();
|
||||
float oz = meta.interactableOffsetZ();
|
||||
|
||||
float wx = so.getWorldX() + ox * cos - oz * sin;
|
||||
float wx = so.getWorldX() + ox * cos + oz * sin;
|
||||
float wy = so.getGroundY() + oy;
|
||||
float wz = so.getWorldZ() + ox * sin + oz * cos;
|
||||
float iRotY = rotY + meta.interactableRotY();
|
||||
float wz = so.getWorldZ() - ox * sin + oz * cos;
|
||||
float iRotY = meta.interactableRotY() - rotY;
|
||||
|
||||
try {
|
||||
if (isBed) {
|
||||
@@ -2526,10 +2535,10 @@ public class SceneObjectState extends BaseAppState {
|
||||
float ox = meta.interactableOffsetX();
|
||||
float oy = meta.interactableOffsetY();
|
||||
float oz = meta.interactableOffsetZ();
|
||||
float wx = so.getWorldX() + ox * cos - oz * sin;
|
||||
float wx = so.getWorldX() + ox * cos + oz * sin;
|
||||
float wy = so.getGroundY() + oy;
|
||||
float wz = so.getWorldZ() + ox * sin + oz * cos;
|
||||
return new float[]{wx, wy, wz, rotY + meta.interactableRotY()};
|
||||
float wz = so.getWorldZ() - ox * sin + oz * cos;
|
||||
return new float[]{wx, wy, wz, meta.interactableRotY() - rotY};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user