User Tools

Site Tools


manual:subwaysim:vehicle_development:simple_vehicle_blueprint

This is an old revision of the document!


Creating a Simple Vehicle Blueprint

In this chapter, we will create a Simple Vehicle Blueprint.

Vehicle Blueprints are responsible for combining all previously created assets — such as the Skeletal Mesh, Animation Blueprint, and Control Rig — into a single, functional vehicle entity.

They define:

  • What is loaded into the game
  • How the vehicle is positioned on the tracks
  • Where bogies and couplings are located
  • How the vehicle interacts with the simulation

In simple terms, the Vehicle Blueprint acts as the master container for everything related to the vehicle that will later be spawned and used in SubwaySim 2.


Creating the Vehicle Blueprint

As a first step, we create an empty Vehicle Blueprint.

Navigate to the root folder of your vehicle, for example:

`SubwaySim_SDK_Testplugin_Content/TestVehicle`

Inside the Content Drawer:

  • Right-click
  • Select Blueprint Class
  • Click All Classes
  • Search for Rail Vehicle
  • Select it and click Select

This creates a new Blueprint based on the Rail Vehicle class.

Name the Blueprint using a clear naming convention:

  • Prefix: BP_
  • Example: `BP_TestVehicle`

Opening the Vehicle Blueprint

Open the newly created Vehicle Blueprint.

You will now see an empty Blueprint with no components assigned yet. This is expected and serves as the foundation for assembling the vehicle.


Setting the Lua Class Name

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

Set this value to:

`RailVehicle`

This step is required so SubwaySim 2 knows which Lua logic is responsible for controlling this vehicle.


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

Add a Skeletal Mesh component:

  • Click Add in the Components panel
  • Search for Skeletal Mesh

The name of this component can be chosen freely, but a clear structure is recommended.

Example:

  • Exterior (for the exterior vehicle mesh)

In the Details panel:

  • Assign the Skeletal Mesh that was imported earlier
  • Make sure it already has the correct Animation Blueprint and Control Rig assigned

Collision Settings

To ensure that the vehicle uses the collision data defined in the Physics Asset, the collision preset must be set correctly.

In the Details panel of the Skeletal Mesh component:

  • Locate the Collision section
  • Set Collision Preset to Vehicle

This step is mandatory.

Without this setting:

  • The Physics Asset collisions will not be applied correctly
  • The vehicle may not collide properly with the environment
  • Interaction and physics behavior can break in-game

Scene Components for Bogies and Couplings

Next, we need to add Scene Components, which act as reference points for the simulation.

Add four Scene Components:

  • Click Add
  • Search for Scene (Utility → Scene Component)

The naming of these components is extremely important and must follow this exact structure:

  • Bogie1 – First bogie
  • Bogie2 – Second bogie
  • Coupling_F – Front coupling
  • Coupling_B – Rear coupling

These names are required so SubwaySim 2 can correctly identify each reference point.

Positioning the Scene Components

Correct positioning of these Scene Components is critical.

  • Bogie1 / Bogie2
    • The origin must be exactly at the center of the respective bogie
    • Z-position must be 0
  • Coupling_F / Coupling_B
  • The origin must be placed at the rotation or mounting point of the Scharfenberg coupling

SubwaySim 2 uses these reference points to:

  • Determine how the vehicle is placed on the tracks
  • Calculate correct vehicle alignment
  • Connect vehicles into train formations

Incorrect positioning will result in faulty coupling behavior or incorrect track placement.

At this point, the basic structure of the Vehicle Blueprint is complete. or vehicles that require more advanced functionality, please continue with the dedicated chapter: Creating a Complex Vehicle Blueprint

That chapter builds upon the foundation created here and explains how to extend the Vehicle Blueprint with advanced systems and features.

manual/subwaysim/vehicle_development/simple_vehicle_blueprint.1766132965.txt.gz · Last modified: by dcs

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki