Train, Rail and Roller Coaster System

Like this:

I think [MENTION=434]BrUnO XaVIeR[/MENTION] refer things like: Gravity, Inertia, acceleration and deceleration. And probably something like avoid Gimbal Lock using blueprints only.

[QUOTE=BrUnO XaVIeR;686910]
Like this:[/QUOTE]

Yes, this is exactly how the system works. Check out the first post for full details on the features. You can also see some of these features in action in the video.

There are two engine settings:

  • Acceleration, weight, friction, gravity all work as expected and are customizable. Trains will slow down as they go up a hill, or speed up as they come down a hill. There is a whole demo map dedicated to this and a map on roller coasters.
  • Constant speeds, here the train will always move at the same speed.

Hope that clears things up, shout if you have any more questions.

PJ Team

this is awesome, or this is awesome? i can’t decide ^^

Looks original and cool, gg :wink:

Very cool asset. Good Job!

Very nice! Looking forward to this becoming available.

We just got our release date, the Train and Rail System will be available on the marketplace next Wednesday, the 5th of April.
Thanks to everyone for their questions, comments and suggestions, we are extremely excited to get it out there and have people use it.

Cannot wait :smiley:


Can you elaborate a bit more on the networking side of things? I assume that no part of the project is currently replicated, but you believe that it should be possible to retrofit networking fairly easily?

Hi ambershee,

Happy to, correct, we haven’t enabled replication for any of the blueprints or the events.

It really comes down to your project and how you want to set it up. There are a lot of functions, events and options in the train carriages, so having that all replicated out of the box would have been overkill and not something that everyone would want. So we built a solid base for people to build and customize off for their project.

If you take a look at the screen shot below you can see a replication test we did. Each carriage has a single update function, we wrapped that in an event and set it to replicate, we also enabled replication for the carriage blueprint. The whole setup took only a few minutes to setup (please ignore the lighting).

We are not experts in network replication, so when it’s released tomorrow we’d love to hear from people that are using it in a networked environment, if they have feedback, find bugs or need things changed so that it’s easier to replicate, then we’d love to hear about it.

Please shout if you’ve any follow up questions,
PJ Team

We are happy to announce that the system is now up on the marketplace:

We’ve updated the first post with info.
Please check out the detailed docs here: TrainAndRail.pdf

If anyone has any issues or questions with the system, please post them here, or if you have anything sensitive you’d like to keep private please contact us at support[AT]polygonjelly[DOT]com


PJ Team

Congrats on the release! Looks stunning and hopefully I’ll pick this up at some point in the near future just to play with XD

It’s really nice and will come in pretty handy. Good job!

If you plan to improve this system further, I’d like to make these suggestions:

  • Adding options to use and automatically animate one static mesh for the bogie frame and one for the wheels instead of having one skeletal mesh with animation would be great. For steam locomotives an animated bogie is of course better but for simple bogies it appears to be extra work. Some modeling software doesn’t support animating or rigging which means an extra step in the workflow that has to be done every time the bogie mesh gets edited.

  • Right now placing trains on the tracks in the editor precisely is a bit difficult and unpredictable (especially near spline points). Since the BP_TrainCarriage already has a setting for “Attached Track” and “Attached Track Spline Index”, being able to place it via a float variable like “Attached Track Distance Along Spline” would allow for more precision.

  • I opened the rollercoaster example map, changed all cars to carriage instead of engine and moved them up a hill to see how the physics work. The train rolled downwards and up a hill again which it couldn’t climb. It eventually came to a stop like this:

It appears only the physics of the parent car are used. Would it be possible to have and option that moves the mass to the center of the train? It doesn’t necessarily have to take each car’s individual mass into account. But for realistic (physics driven) rollercoasters only single car coasters seem to be possible as of now.

hey man
thanks for this awesome pack, just a silly question here, is this something that works as intended

It is working as intended but I was also seeking a way to improve it. First of all it is mostly due to the small curve radius. Secondly moving the bogies further to the outside of the carriage improves it. Also there is a setting for distance between the carriages. So setting it to 0 or even to a negative number moves them closer together, but it will still happen in curves.

One way to fix it in a non-realistic way would be to create carriages which simply consist of two couplers coupled together. Put them between the “real” cars (while the real cars don’t have any couplers at all) and it will most likely look better, even though couplers are mostly fixed to the frame of the car in real life as far as I know.

Hi DasMatze, thanks and yes please, the more feedback the better.

  • Understood, we’ll look at adding an option for skel vs. static mesh today. For simple bogies, a single non-animated bone at the center would work. You could also change the blueprint to use a static mesh if that’s easier.

  • We do actually have such a value, it’s just hidden and set automatically by the snapping function, let me see about exposing it.
    If you need more precision, you can: disable snapping, move the carriage into place and then re-enable snapping. That should snap to a much closer point. If it’s a long piece of track, increase the ‘attach distance samples’.

  • Let me look at that for you today and see how soon we could get that in. But yes, that’s something we want as well.

Yep, as DasMatze said it’s down to the sharp turn in the track.

This is excellent, we are really glad there’s feedback and people are using the product, so thanks. We’ll do some work on the updates today and update this thread when we have more info.

Thanks again,

PJ Team

Ah, I must have missed that. Thanks, it works well.

Somehow my track mesh looks weird but only at the end of a spline (doesn’t matter whether it’s connected or not):


I checked the track-blueprint’s part about the mesh spacing and count but I can’t see what could cause it. Any idea?

Edit: It seems to happen when the last mesh of the spline is between 0% to 25% long.

Hi DasMatze,

The tracks will fill in any space. So the mesh size is repeated as many times as possible along the spline, so if your mesh is 100 wide and the track is 180 wide then the first will appear fine and the second will become a bit squished.
If you want to disable this filling it’s a small change, and we’ll add it as an extra option for the next release.

Open up “BP_TrainTrack” and then open the function “BuildTrackMesh”.
Find the location where “MeshCount” is set, it should look like the screen shot below. Then just before the variable is set, subtract 1, like in the screen shot.
Then hit compile and you’re good to go (Recompile in an empty map, if you compile on a map with a lot of track blueprints, it could take some time)

Hope that helps and shout if you’ve any more questions.

PJ Team

Thank you, but then the end of the track is missing (as expected).

After messing around some more I noticed the tangents were causing it and I reworked the mesh building part (see attachments). It simply gives every mesh segment the same length. The length will differ from spline to spline (which is can give unrealistic and undesired results compared to your handling of the meshes) but it works with my meshes and is sufficient enough.