Dokumentation
Last updated
Last updated
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 )
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.
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.
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.
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
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.