feat: finish step 3

This commit is contained in:
Krzysztof kuhy Rudnicki 2026-01-05 18:31:10 +01:00
parent 85cd1d1c79
commit d27d5deb93
3 changed files with 8 additions and 8 deletions

View File

@ -474,14 +474,14 @@ The entry node should now show two input pins: SpawnLocation and Direction
13. **Convert angle from degrees to a direction vector:** 13. **Convert angle from degrees to a direction vector:**
In Unreal's top-down view (looking down Z axis): In Unreal's top-down view (looking down Z axis):
- X axis = forward/back (up/down on screen) - X axis = up/down on screen (vertical)
- Y axis = left/right - Y axis = left/right on screen (horizontal)
- Angle 0° = straight up = direction (1, 0, 0) - Angle 0° = straight up = direction (1, 0, 0)
- Angle 90° = right = direction (0, 1, 0) - Angle 90° = right = direction (0, 1, 0)
``` ```
Direction.X = Cos(angle) Direction.X = Cos(angle) // Cos for vertical (forward/up)
Direction.Y = Sin(angle) Direction.Y = Sin(angle) // Sin for horizontal offset
Direction.Z = 0 Direction.Z = 0
``` ```
@ -492,11 +492,11 @@ The entry node should now show two input pins: SpawnLocation and Direction
- Connect your angle (from step 12) to the input - Connect your angle (from step 12) to the input
- Output is angle in radians - Output is angle in radians
**b) Calculate X component (Cos):** **b) Calculate X component (Cos - forward/up direction):**
- Right-click → `Cos (Radians)` → add it - Right-click → `Cos (Radians)` → add it
- Connect the Degrees To Radians output to Cos input - Connect the Degrees To Radians output to Cos input
**c) Calculate Y component (Sin):** **c) Calculate Y component (Sin - horizontal offset):**
- Right-click → `Sin (Radians)` → add it - Right-click → `Sin (Radians)` → add it
- To connect the SAME radians value to Sin (without losing the Cos connection): - To connect the SAME radians value to Sin (without losing the Cos connection):
- **Option 1:** Ctrl+drag from "Degrees To Radians" output to Sin input (creates second wire) - **Option 1:** Ctrl+drag from "Degrees To Radians" output to Sin input (creates second wire)
@ -505,8 +505,8 @@ The entry node should now show two input pins: SpawnLocation and Direction
**d) Make the direction vector:** **d) Make the direction vector:**
- Right-click → `Make Vector` - Right-click → `Make Vector`
- Connect Cos result to X - Connect Cos result to X (forward/up direction)
- Connect Sin result to Y - Connect Sin result to Y (horizontal spread)
- Set Z = 0 - Set Z = 0
14. **Spawn the bullet:** 14. **Spawn the bullet:**