Hivemind
  • 🔍Start Here
  • 💻Code Systems
    • 🐎Ultimate Horse System
      • Documentation
      • Integration Guide
    • 🚀Ultimate Spaceship System (USS) Knowledge Base
      • 📖USS Documentation
      • 🧩USS Integration Guide
    • 🚂Ultimate Train System
      • Dokumentation
      • Integration Guide
    • ⚔️Modular Character System
      • Documentation
      • Trailer
    • ⚒️Ultimate Building System Framework (UBS)
      • 🔍Introduction
      • Installation
        • Example Content Setup
      • Developer Settings
        • Initial Setup
        • Collision Channels
      • Quick Start
      • Ultimate Building System Component (UBS)
      • Buildable Definition
      • Buildable
        • Actions
        • Tag Qualifier Conditions
        • Dependencies
      • Proxy Behaviour
        • Trace Behaviour
        • Proxy Location Offset
        • Placement Conditions
        • Post Build Events
      • Using your own Meshes
      • Global Function References
  • ✨VFX
    • 🩸Realistic Blood VFX
      • Documentation
      • Video Tutorial
    • 🩸Stylized Blood VFX
      • Documentation
    • 💥Realistic Gun Effects
      • Documentation
    • ☁️Smoke & Fog VFX Knowledge Base
      • 📖Smoke & Fog Documentation
      • 📸Video Tutorials
  • 🏡Environments
    • 🌃 Cyberpunk City
      • Level Instance
      • Tech Tools
    • 🏰Modular Castle & Dungeon
      • Documentation
      • Trailer
    • 🏘️Modular Rural Town
      • Documentation
      • Trailer
Powered by GitBook
On this page
  • Usage Guide
  • Step1 - Use BP_Rails to create your track
  • Step 2 Add the Locomotive
  • Step 3 - Setting up chain of carts
  • Emergency Stop Brick
  • Making long chains of carts
  • Using the BP_rails spline blueprint in the level
  • Improving Performance when Assembling long spline networks
  1. Code Systems
  2. Ultimate Train System

Dokumentation

PreviousUltimate Train SystemNextIntegration Guide

Last updated 27 days ago

Usage Guide

Step1 - Use BP_Rails to create your track

If you're building a closed loop system, you'll have to toggle Closed Loop setting, otherwise the train will not loop the track and stop moving after a single lap

Spacing variable essentially just tweaks the Cell size when extruding and duplicating the mesh along the spline, tune it to whichever value yields best looking results.

Step 2 Add the Locomotive

Drag the BP_Train blueprint into the level and place it over the rail track you want it to roll on. ( Train blueprint scans for nearest Rail Track and initializes the spline path at runtime )

Animation speed variable controls both speed of the animation and actual travel speed along the spline and is perfectly synchronized to the animation.

Starting position controls the starting offset on the spline when you hit Simulate/Play. At 0, train will always begin from starting point of the spline.

Step 3 - Setting up chain of carts

Next step is to drag as many carts as you need into the level and assign the desired Locomotive reference for each cart (it's not automatic in case there are several trains in the level)

Then, those exact same carts need to be added to the Attached Carts array within BP_Train_Blueprint itself

And you are done. Hit simulate / play and your train should be taking off.

Emergency Stop Brick

This package doesn't come with station stops logic, however it does come with emergency stop brick. BP_StopPoint functions basically like a collision check. Whenever train runs past this brick, it enters into emergency breaking mode, decelerating over 15 seconds until it comes to a full halt.

Making long chains of carts

Although there is no limit on how many carts you can add, due to the nature of how the connecting hinges on these carts work, they are not great at taking strong turns. More carts joined on a chain result in more inaccurate looking line when taking turns.

Strong turns like the ones in the example picture above work with 4-5 carts before the chain starts to visually break apart.

If your Track is far more straight and smooths out turns over longer distances, you can get away by making longer chains.

Using the BP_rails spline blueprint in the level

When Dropping the Rails prefab into the level, it may be difficult to select the spline points.

To circumvent that, select the spline component inside blueprint details panel

And Click on spline point selector to switch to last spline point

Then, modify the location value of that spline point to move it further from the blueprint

This will result in Bigger and easily selectable Spline point, which then you can select with your cursor and modify freely

Improving Performance when Assembling long spline networks

When making big spline networks, there's a good chance your preview of the spline will slowdown significantly. Especially more when you add a lot of spline points. It may take a while to recalculate the spline and reconstruct the mesh each time you make even a slight modification.

To make this process smoother, it is recommended to a use a simplified Preview Mesh for the spline until you are happy with its general shape and size.

For example, you could select Existing SM_Rails mesh and downscale its complexity within the mesh reduction settings

Using this approach, you can downscale the original geometry of the rail segment down to as little as 3% , which takes it down from 11k Triangles to 440 and that will significantly speed up spline generation process when testing it in the level.

Once you're happy with your spline layout, you can Undo the Reduction settings > back to 100% Triangles and it will recreate your spline with a high quality topology and smooth turns.

💻
🚂
Locomotive setup examples available in TrainTest level