feat(shop): configurable package display rotation, pocoregal shelf model

Add _displayRotationEuler to Lieferkarton/ShelfSlot so package prefabs
with a non-upright export orientation can be corrected per-container
without touching PackageDisplay code. Fixes a bug where flying packages
landed with a different rotation than the resting shelf display
(PlayerCarry used the raw shelf transform instead of
ShelfSlot.GetSlotWorldRotation()).

Also adds the pocoregal shelf model (Blender export) and its materials,
places it in the Shop scene, registers ShelfSlot as a network prefab,
and rescales EmptyBox. See docs/PACKAGE_DISPLAY_SETUP.md for the
display-grid setup/troubleshooting reference.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-16 16:13:32 +02:00
co-authored by Claude Sonnet 5
parent 8ca4858082
commit 9eb588e491
19 changed files with 1126 additions and 285 deletions
+4 -2
View File
@@ -17,15 +17,17 @@ namespace AfterHours.Shop
private readonly int _columns;
private readonly int _rows;
private readonly Vector3 _spacing;
private readonly Quaternion _rotation;
private readonly List<GameObject> _instances = new();
private GameObject _prefab;
public PackageDisplay(Transform root, int columns, int rows, Vector3 spacing)
public PackageDisplay(Transform root, int columns, int rows, Vector3 spacing, Vector3 rotationEuler = default)
{
_root = root;
_columns = Mathf.Max(1, columns);
_rows = Mathf.Max(1, rows);
_spacing = spacing;
_rotation = Quaternion.Euler(rotationEuler);
}
/// <summary>Baut die Anzeige auf <paramref name="count"/> Instanzen an (gedeckelt bei maxVisible).</summary>
@@ -47,7 +49,7 @@ namespace AfterHours.Shop
{
var instance = Object.Instantiate(_prefab, _root);
instance.transform.localPosition = SlotLocalPosition(_instances.Count);
instance.transform.localRotation = Quaternion.identity;
instance.transform.localRotation = _rotation;
_instances.Add(instance);
}