Remove GetSocketWorldTransformByIndex – replaced with error logging
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2fcf4febee
commit
1e723748b4
1 changed files with 4 additions and 12 deletions
|
|
@ -261,18 +261,12 @@ Implementierung in jedem Raum:
|
|||
|
||||
**WICHTIG:** Wir holen Location/Rotation direkt von der **Arrow Component Referenz** (SocketComponent), nicht aus dem gespeicherten LocalTransform. So bekommen wir immer die aktuelle Weltposition, auch wenn der Actor bewegt wurde.
|
||||
|
||||
**GetSocketWorldTransformByIndex** (existiert bereits, behalten als Fallback):
|
||||
- Input: SocketIndex (Int)
|
||||
- Output: Location (Vector), Rotation (Rotator)
|
||||
- Implementierung: Get Components by Class → Get (Index) → GetWorldLocation + GetWorldRotation
|
||||
|
||||
### 2.5 BPI_DungeonRoom Interface aktualisieren
|
||||
|
||||
| Funktion | Inputs | Outputs |
|
||||
|---|---|---|
|
||||
| GetSocketDefinitions | – | SocketDefinitions (Array S_SocketDefinition) |
|
||||
| GetSocketWorldTransformById | SocketId (Name) | Location (Vector), Rotation (Rotator), Success (Bool) |
|
||||
| GetSocketWorldTransformByIndex | SocketIndex (Int) | Location (Vector), Rotation (Rotator) |
|
||||
| GetRoomType | – | RoomType (E_RoomType) |
|
||||
|
||||
**Entfernte Funktionen** (Laufzeit-State liegt jetzt im Generator):
|
||||
|
|
@ -1012,10 +1006,10 @@ Diese Funktion dockt einen neuen Raum an einen offenen Socket eines bestehenden
|
|||
|
||||
**Schritt 1: Socket-Weltposition holen (via Interface)**
|
||||
|
||||
1. → OpenSocket → **Break S_OpenSocketData** → OwnerRoom, SocketId, SocketIndex
|
||||
1. → OpenSocket → **Break S_OpenSocketData** → OwnerRoom, SocketId
|
||||
2. → OwnerRoom → **GetSocketWorldTransformById (Message)** (SocketId) → Location, Rotation, Success
|
||||
3. → **Branch** (Success)
|
||||
- False ▶: OwnerRoom → **GetSocketWorldTransformByIndex (Message)** (SocketIndex) → Location, Rotation (Fallback)
|
||||
- False ▶: **Print String** "ERROR: Socket not found!" → **Return** (SpawnedRoom: None, Success: false)
|
||||
4. → Location → **Set SocketWorldPos**
|
||||
|
||||
**Schritt 2: Ziel-Rotation berechnen (WARUM 180°?)**
|
||||
|
|
@ -1033,9 +1027,8 @@ Wenn zwei Räume aneinander andocken, müssen ihre Sockets **einander zugewandt*
|
|||
|
||||
Der neue Raum wurde bei (0,0,0) ohne Rotation gespawnt. Jetzt berechnen wir, wo sein Eingangs-Socket relativ zum Actor-Origin liegt:
|
||||
|
||||
7. → TempRoom → **GetSocketWorldTransformById (Message)** (MatchingSocketId) → TempSocketLocation, TempSocketRotation, Success
|
||||
- **Bevorzugt ById** statt ByIndex, weil GetSocketWorldTransformById auf die SocketDefinitions-Variable zugreift (im Construction Script befüllt), während ByIndex über Get Components by Class geht, was auf frisch gespawnten Actors fehlschlagen kann (siehe 7.6)
|
||||
- Falls ById fehlschlägt (Success == false): Fallback auf **GetSocketWorldTransformByIndex (Message)** (NewSocketIndex)
|
||||
7. → TempRoom → **GetSocketWorldTransformById (Message)** (NewSocketId) → TempSocketLocation, TempSocketRotation, Success
|
||||
- Falls ById fehlschlägt (Success == false): **Print String** "ERROR: NewSocket not found!" → TempRoom → **Destroy Actor** → **Return** (SpawnedRoom: None, Success: false)
|
||||
8. → TempSocketLocation **- (Subtract Vector)** TempRoom → **GetActorLocation** → **Set TempSocketOffset**
|
||||
- Das ist der Vektor vom Actor-Origin zum Socket, in Weltkoordinaten (bei Rotation 0)
|
||||
|
||||
|
|
@ -1091,7 +1084,6 @@ Für jeden Raum-Blueprint (Entrance, General, Corridor, PortalIn, PortalOut, Exi
|
|||
5. Interface-Funktionen implementieren:
|
||||
- **GetSocketDefinitions**: SocketDefinitions Variable → Return Node
|
||||
- **GetSocketWorldTransformById**: Implementierung siehe Teil 2.4
|
||||
- **GetSocketWorldTransformByIndex**: Get Components by Class (Arrow) → Get (Index) → GetWorldLocation + GetWorldRotation → Return
|
||||
- **GetRoomType**: RoomType Variable → Return Node
|
||||
6. **Entfernen** (falls vorhanden):
|
||||
- ~~SetIsOnMainPath~~, ~~GetIsOnMainPath~~
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue