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
  • Custom carts mesh setup
  • Mesh setup
  • Blueprint Instance Setup
  • Final touches - Variable Setup
  1. Code Systems
  2. Ultimate Train System

Integration Guide

PreviousDokumentationNextModular Character System

Last updated 27 days ago

Custom carts mesh setup

Disclaimer : For this to work, you must have a suitable rigged and animated skeletal mesh ready. Which is also scaled to match the rail tracks with their wheels. This new mesh must have a loopable animation of the wheels spinning in motion.

Mesh setup

Once you have a mesh ready, you need to re-import it with correct offsets

Your cart mesh has to have it's 0.0.0 center axis on the spot where the rotation hinge will be (the hinge through which it will be connected to the following cart or the locomotive) as it will be the origin of it's rotation as it moves alongthe rail tracks.

Additionally, you'd also want to attach this Hinge mesh attachment at the end of it to allow additional carts to be connected afterwards. You can find this mesh inside Content/Train/Meshes named as SM_CLAMP.

You can do this in your 3D editor or inside the prefab blueprint, it doesn't really matter as long as it's there.

Additionally, you will have to make a new Animation blueprint that has identical logic to ABP_CoalCart

You may be able to get away by using an ABP child instance if you rig your custom model under the same skeleton, otherwise you'll have to make a fresh copy and carry over the from the animgraph.

Blueprint Instance Setup

Find BP_CoalCart and Make an Child Instance Class, name it whatever you want, it will be your new custom cart.

Open up your new blueprint class. and replace the Skeletal Mesh with your new mesh

You will also have to swap out the ABP_CoalCart with your new ABP you made earlier.

Add this node setup on your BeginPlay, (this example has ABP_CoalCart, this is where you would cast to your new ABP instead) and set the speed to 0 to avoid any glitches.

You will also have to setup overrides for the ABP control functions. In this case you only need to Override Update ABP speed and Update ABP rot

Once again, setup the functions in this way (except use your new ABP instead of ABP_CoalCart cast node)

Final touches - Variable Setup

Now that your mesh and ABP references and functions are ready to go, you need to do the final tuning, find a rotation sweet spot for the Cart Length. Try to enter the closest value of the distance from the 0.0.0 point (hooking point) to the back of your cart in centimeters. (you may want to fiddle with the value a bit to get best looking results as it not 100% accurate)

Also if your wheel spinning animation speed looks out of sync from the train Locomotive animation speed , you may want to open the Animation asset itself and play with the Rate Scale variable until you get a better looking result.

And that's it. Now your cart is ready and you can drop the in the level and add them to the Locomotive cart chain just like the usual carts in the example.

💻
🚂