manual:subwaysim:vehicle_development:simple_vehicle_blueprint
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| manual:subwaysim:vehicle_development:simple_vehicle_blueprint [2025/12/19 10:09] – [Assigning the Bogie Scene Components] dcs | manual:subwaysim:vehicle_development:simple_vehicle_blueprint [2026/01/07 09:36] (current) – dcs | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Creating a Simple Vehicle Blueprint ====== | ====== Creating a Simple Vehicle Blueprint ====== | ||
| + | |||
| + | ===== Overview ===== | ||
| In this chapter, we will create a **Simple Vehicle Blueprint**. | In this chapter, we will create a **Simple Vehicle Blueprint**. | ||
| Line 14: | Line 16: | ||
| ---- | ---- | ||
| - | |||
| ===== Creating the Vehicle Blueprint ===== | ===== Creating the Vehicle Blueprint ===== | ||
| + | |||
| + | ==== Creating the Blueprint Asset ==== | ||
| As a first step, we create an empty Vehicle Blueprint. | As a first step, we create an empty Vehicle Blueprint. | ||
| Line 41: | Line 44: | ||
| ---- | ---- | ||
| + | ===== Vehicle Blueprint Setup ===== | ||
| - | ===== Opening the Vehicle Blueprint | + | ==== Opening the Vehicle Blueprint ==== |
| Open the newly created Vehicle Blueprint. | Open the newly created Vehicle Blueprint. | ||
| Line 49: | Line 53: | ||
| This is expected and serves as the foundation for assembling the vehicle. | This is expected and serves as the foundation for assembling the vehicle. | ||
| - | ---- | + | ==== Setting the Lua Class Name ==== |
| - | + | ||
| - | ===== Setting the Lua Class Name ===== | + | |
| Before adding any components, we must define which Lua class this vehicle belongs to. | Before adding any components, we must define which Lua class this vehicle belongs to. | ||
| - | In the **Details** panel of the Vehicle Blueprint, locate the field: **Lua Class Name** | + | In the **Details** panel of the Vehicle Blueprint, locate the field **Lua Class Name** |
| - | Set this value to:`RailVehicle` | + | `RailVehicle` |
| {{: | {{: | ||
| Line 64: | Line 66: | ||
| ---- | ---- | ||
| - | |||
| ===== Adding Required Components ===== | ===== Adding Required Components ===== | ||
| - | To ensure the vehicle can be placed correctly on the tracks and function properly in SubwaySim 2 (including AI usage), several components must be added. | + | ==== Skeletal Mesh Component ==== |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ===== Skeletal Mesh Component | + | |
| Add a Skeletal Mesh component: | Add a Skeletal Mesh component: | ||
| Line 80: | Line 77: | ||
| Example: | Example: | ||
| - | * **Exterior** | + | * **Exterior** |
| In the **Details** panel: | In the **Details** panel: | ||
| * Assign the Skeletal Mesh that was imported earlier | * Assign the Skeletal Mesh that was imported earlier | ||
| - | ---- | + | ==== Assigning the Animation Blueprint ==== |
| - | + | ||
| - | ===== Assigning the Animation Blueprint | + | |
| To enable animations (including the Control Rig), the Animation Blueprint must be assigned manually. | To enable animations (including the Control Rig), the Animation Blueprint must be assigned manually. | ||
| In the **Details** panel of the Skeletal Mesh component: | In the **Details** panel of the Skeletal Mesh component: | ||
| - | * Locate | + | * Locate **Anim Class** |
| * Select the **Animation Blueprint (ABP_)** created earlier | * Select the **Animation Blueprint (ABP_)** created earlier | ||
| - | Use the Animation Blueprint defined in the chapter: [[manual: | + | Use the Animation Blueprint defined in the chapter: |
| - | + | [[manual: | |
| - | This Animation Blueprint internally references the Control Rig and is required for bogie and axle animation to function correctly. | + | |
| {{: | {{: | ||
| - | ---- | + | ==== Collision Settings ==== |
| - | + | ||
| - | ===== Collision Settings | + | |
| To ensure that the vehicle uses the collision data defined in the Physics Asset, the collision preset must be set correctly. | To ensure that the vehicle uses the collision data defined in the Physics Asset, the collision preset must be set correctly. | ||
| Line 110: | Line 102: | ||
| * Locate the **Collision** section | * Locate the **Collision** section | ||
| * Set **Collision Preset** to **Vehicle** | * Set **Collision Preset** to **Vehicle** | ||
| - | |||
| - | This step is mandatory. | ||
| {{: | {{: | ||
| Without this setting: | Without this setting: | ||
| - | * The Physics Asset collisions will not be applied correctly | + | * Physics Asset collisions will not be applied correctly |
| * The vehicle may not collide properly with the environment | * The vehicle may not collide properly with the environment | ||
| * Interaction and physics behavior can break in-game | * Interaction and physics behavior can break in-game | ||
| - | |||
| ---- | ---- | ||
| + | ===== Bogie and Coupling Setup ===== | ||
| - | ===== Scene Components for Bogies and Couplings | + | ==== Scene Components for Bogies and Couplings ==== |
| - | Next, we need to add **Scene Components**, | + | Add four **Scene |
| - | + | * **Bogie1** – first bogie | |
| - | Add four Scene Components: | + | * **Bogie2** – second |
| - | * Click **Add** | + | * **Coupling_F** – front coupling |
| - | * Search for **Scene** | + | * **Coupling_B** – rear coupling |
| - | + | ||
| - | The naming of these components is **extremely important** and must follow this exact structure: | + | |
| - | + | ||
| - | * **Bogie1** – First bogie | + | |
| - | * **Bogie2** – Second | + | |
| - | * **Coupling_F** – Front coupling | + | |
| - | * **Coupling_B** – Rear coupling | + | |
| {{: | {{: | ||
| - | These names are required so SubwaySim 2 can correctly identify each reference point. | + | The naming of these components is **mandatory** and must follow this exact structure. |
| - | ---- | + | ==== Positioning the Scene Components ==== |
| - | ===== Positioning the Scene Components ===== | + | Correct positioning is critical: |
| - | + | ||
| - | Correct positioning | + | |
| * **Bogie1 / Bogie2** | * **Bogie1 / Bogie2** | ||
| - | * The origin must be exactly | + | * Origin |
| * Z-position must be **0** | * Z-position must be **0** | ||
| - | | + | |
| * **Coupling_F / Coupling_B** | * **Coupling_F / Coupling_B** | ||
| - | * The origin must be placed | + | * Origin |
| - | SubwaySim 2 uses these reference points | + | These reference points are used by SubwaySim 2 to: |
| - | * Determine how the vehicle | + | * Place the vehicle on the tracks |
| - | * Calculate correct | + | * Calculate correct alignment |
| * Connect vehicles into train formations | * Connect vehicles into train formations | ||
| Line 163: | Line 144: | ||
| ---- | ---- | ||
| + | ===== Bogie Initialization ===== | ||
| - | ===== Initializing Bogie Data ===== | + | ==== Initializing Bogie Data ==== |
| - | After adding all required components, | + | After adding all required components, the bogie data must be initialized. |
| - | This setup is done inside | + | This setup is done in the **Event Graph** of the Vehicle Blueprint. |
| - | ---- | + | ==== Adding the Required Nodes ==== |
| - | 4 | + | Open the **Event Graph**. |
| - | ===== Adding | + | |
| - | Open the **Event Graph** of your Vehicle Blueprint. | + | Add the initialization event: |
| - | + | * Right-click | |
| - | First, create | + | |
| - | * Right-click | + | |
| - | * Search for **Event Initialize Bogies** | + | |
| - | * Add the node | + | |
| {{: | {{: | ||
| - | This event is called automatically and is used to register all bogies of the vehicle. | + | Add two bogie nodes: |
| + | * Right-click → **Add Bogie** | ||
| + | * Repeat until you have **two Add Bogie nodes** | ||
| - | Next, add the bogie nodes: | + | ==== Preparing |
| - | * Right-click in the graph | + | |
| - | * Search for **Add Bogie** | + | |
| - | * Add the node | + | |
| - | Repeat this step so that you have **two Add Bogie nodes** — one for each bogie. | + | For each **Add Bogie** node: |
| - | + | * Right-click | |
| - | ---- | + | |
| - | + | ||
| - | ===== Preparing the Bogie Data ===== | + | |
| - | + | ||
| - | On each **Add Bogie** node: | + | |
| - | * Locate | + | |
| - | * Right-click on the pin | + | |
| * Select **Split Struct Pin** | * Select **Split Struct Pin** | ||
| {{: | {{: | ||
| - | This exposes the internal data fields of the Bogie Data structure. | + | ==== Assigning |
| - | ---- | + | Assign |
| - | + | ||
| - | ===== Assigning | + | |
| - | + | ||
| - | Now we assign the previously created | + | |
| - | + | ||
| - | For each **Add Bogie** node: | + | |
| - | * Locate the **Bogie Socket** pin | + | |
| - | * Drag a connection from the pin | + | |
| - | * Search for **Get** | + | |
| - | * Select the Scene Component corresponding to the bogie | + | |
| - | + | ||
| - | {{: | + | |
| - | Assign them as follows: | ||
| * First **Add Bogie** → **Bogie1** | * First **Add Bogie** → **Bogie1** | ||
| * Second **Add Bogie** → **Bogie2** | * Second **Add Bogie** → **Bogie2** | ||
| - | This ensures that SubwaySim 2 knows the exact position of each bogie on the vehicle. | + | {{: |
| - | Once both **Add Bogie** nodes are connected correctly, | + | This ensures SubwaySim 2 knows the exact position of each bogie. |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | ===== Linking the Scene Components ===== | + | |
| - | + | ||
| - | Each **Add Bogie** node must be linked to the corresponding Scene Component created earlier: | + | |
| - | + | ||
| - | * First **Add Bogie** → assign **Bogie1** | + | |
| - | * Second **Add Bogie** → assign **Bogie2** | + | |
| {{: | {{: | ||
| - | |||
| - | Make sure you select the correct Scene Components, otherwise the bogie positions will be wrong and the vehicle will not be placed correctly on the track. | ||
| - | |||
| - | Once both bogies are added and linked, the bogie initialization is complete. | ||
| - | |||
| - | (Continuation follows: further setup of couplings, AI placement, and additional vehicle configuration.) | ||
| ---- | ---- | ||
| - | |||
| - | |||
| ===== Completion of the Simple Vehicle Blueprint ===== | ===== Completion of the Simple Vehicle Blueprint ===== | ||
| - | With the bogie data initialized, | + | With the bogie data initialized, |
| - | This blueprint | + | This blueprint is suitable for: |
| * Simple AI-controlled vehicles | * Simple AI-controlled vehicles | ||
| * Static or basic rolling stock | * Static or basic rolling stock | ||
| - | * Vehicles without interactive systems | + | * Vehicles without interactive systems |
| - | + | ||
| - | It provides only the essential components required for correct placement on the tracks and basic movement within SubwaySim 2. | + | |
| ---- | ---- | ||
| - | |||
| ===== Important Note ===== | ===== Important Note ===== | ||
| - | This setup **does not** include: | + | This setup **does not include**: |
| * Player interaction | * Player interaction | ||
| * Advanced vehicle systems | * Advanced vehicle systems | ||
| - | * Door, coupling, or cab interaction | + | * Door, coupling, or cab logic |
| - | * Additional | + | * Extended |
| - | + | ||
| - | At this point, the basic structure of the Vehicle Blueprint is complete. | + | |
| - | or vehicles that require more advanced functionality, | + | |
| - | That chapter builds upon the foundation created here and explains how to extend the Vehicle Blueprint | + | For vehicles requiring more advanced functionality, |
| + | [[manual: | ||
| {{page> | {{page> | ||
manual/subwaysim/vehicle_development/simple_vehicle_blueprint.1766135364.txt.gz · Last modified: by dcs
