Announcement

Collapse
No announcement yet.

Train, Rail and Roller Coaster System

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Hi
    Building a coaster I have mirrored a portion of the track, is it possible to reverse the connection points on the track sections so I don't have to re-build the whole thing?

    Leave a comment:


  • replied
    julez4001,
    This is possible, the each carriage can have a parent or a child. Usually you'd set this in the editor, but there's nothing stopping you from doing this dynamically.
    There are also track triggers in the system, so for your setup you'd have your train run over the trigger, and disconnect one of the carriages from the parent.
    Then you'd have another trigger that reconnects them.
    You'll probably need a custom trigger, but that's all straight forward.


    Hevedy
    Yep, check out the map: movement_smoothing.umap in the maps folder. It shows two trains, one with smoothing and one without.
    It works pretty well and you can tune the smoothing depending on what you want.
    You could build far more accurate movement functions for splines in UE, but this works well as a general use case for most peoples needs.

    Leave a comment:


  • replied
    Originally posted by PolygonJelly View Post
    Hi Hevedy,

    I haven't tried the world origin shifting, but I'll try it out and see if any changes need to be made. I have some new examples and updates I want to get out in the next few weeks, I just need to try and find the time to get to them.

    Have you checked out the movement smoothing option? I added it to prevent such spline errors and keep the wheels in a constant location.

    Cheers,
    PJ
    Interesting is there some packaged sample can view the smooth option working ?

    Leave a comment:


  • replied
    PolygonJelly

    I have a scenario that i want to make sure is possible before I purchase.
    Build a train with an engine and 24 cars
    I want to able to switch to a different track and leave a cut (a group of cars) on said track.
    A second engine comes and picked up the previously cut cars
    So I guess I am asking is dynamic parenting is already built in to allow for multiple train scenarios.
    Last edited by julez4001; 06-07-2018, 08:22 AM.

    Leave a comment:


  • replied
    Hi Hevedy,

    I haven't tried the world origin shifting, but I'll try it out and see if any changes need to be made. I have some new examples and updates I want to get out in the next few weeks, I just need to try and find the time to get to them.

    Have you checked out the movement smoothing option? I added it to prevent such spline errors and keep the wheels in a constant location.

    Cheers,
    PJ

    Leave a comment:


  • replied
    Originally posted by PolygonJelly View Post
    Hevedy
    Which origin is shifting? Yes, the examples come with speed control.
    "World Origin Shifting" as said is a engine feature https://docs.unrealengine.com/en-us/...g/WorldBrowser just asked if works with.

    Another thing, I found you have the same problem I found while tried to make a train back in the time without your pack. On your sample demo, there is a train doing a loop with another one in one of the samples and you can clear see how the wheels move forward and backward because the spline curve error that the engine have by default, that can't be solved at all without make it on C++ or create a custom system, is even worst if you check it on a huge difference curves or splines with huge difference on distances and the wheels go total off of the train like up 5m off depending of the rail sizes

    Leave a comment:


  • replied
    Hevedy
    Which origin is shifting? Yes, the examples come with speed control.

    @Romansky'
    In your example you're just setting the attached track and nothing else. Check out the construction script, there are functions that take care of all this logic for you.
    The flow needs to be set the track in the carriage and then set it for the bogies, since they are ones that actually move the carriage down the track.


    See the 'Attach to track' and 'Refresh positions on track' functions.
    You can use those for exactly what you want, or if you need something more custom, you can make a copy of those functions and update it to your needs.

    Hope that helps, shout if you've any more questions.
    ​​​​​​​PJ

    Leave a comment:


  • replied
    Hello,

    Currently i'm fighting with some issue. I want to spawn a mine cart in REAL TIME and attach him to the nearest track and let him go forward, so i wrote some code to achive this.

    Click image for larger version  Name:	image_138882.jpg Views:	2 Size:	142.5 KB ID:	1481397



    When i hit "Play", this things happen:

    Click image for larger version  Name:	error_msg.jpg Views:	1 Size:	233.0 KB ID:	1481398

    Any ideas how can i fix this ?

    Thanks in advice.

    Kind Regards,
    Roman
    Last edited by Romansky'; 05-27-2018, 07:26 PM.

    Leave a comment:


  • replied
    Got some questions about this... Do this work with world shifting origin ? And do come with a sample that the player can control the train or something on forward and backward and speeds ?

    Leave a comment:


  • replied
    [QUOTE="clone45;n1461107"]
    Originally posted by PolygonJelly View Post
    On spline points: You don't need to use the slow right click menu, you can just drag new spline points off using the standard spline controls.
    Check out the official Unreal docs for info on these.

    Could you link to where the docs cover thanks features? Thanks!
    For sure, check out these docs; https://docs.unrealengine.com/en-us/...ponentInEditor
    The official docs can be a bit sparse at times, but all the spline controls are pretty much the same, so if you look at a couple of their spline docs you'll get everything you need.

    To add points just hold down alt on a selected point and drag to create a new point. Then just experiments with the point and tangent controls to get the look you are after.

    Hope that helps,
    PJ

    Leave a comment:


  • replied
    [QUOTE="PolygonJelly;n1452413"]On spline points: You don't need to use the slow right click menu, you can just drag new spline points off using the standard spline controls.
    Check out the official Unreal docs for info on these.

    Could you link to where the docs cover thanks features? Thanks!

    Leave a comment:


  • replied
    heimspiel
    The speed will change depending on the incline, E.g. it will slow down going up a hill. You can set the coaster to use constant speeds, then use the trigger to set the max speed.

    Adammalvern
    Check out the trigger example map, or the trigger blueprints. Here you'll see how by getting a reference to the train we can apply the brakes or change the speed.
    So, you'd have your train on the map, set to stopped. Then add an ordinary trigger and get a reference to that train, then when the trigger is overlapped, release the brakes and set it to moving. You can even set the current speed if it needs to be moving at that speed as the player comes around the corner.

    Leave a comment:


  • replied
    To shorten my question - How would I get the train to run on overlap, as opposed to BeginPlay?

    Leave a comment:


  • replied
    Hi again,

    Very much got the hang of working with the plug-in now, it's been incredibly useful, so thank you for that. I have one last question though. My project is VR based, and I have a rideable rollercoaster with a camera, that becomes active when the motion controller pawn/player overlaps with a box trigger. My issue is that by the time the player reaches this point, a significant part of the coaster track is missed. Is there anyway to make it so the train doesn't begin moving on play, instead starts moving upon the player character overlapping with a box-trigger? I've been trying to set it up for a while now, but with no success. Would this involve working with the level blueprint, or the track/coaster cart blueprint?

    Thank you

    Leave a comment:


  • replied
    Hi,

    i used the example coaster map and changed the max speed of the speed triggers. But the problem is the speed also changed at some points of the track but there where no speed triggers. Why is that?

    Leave a comment:

Working...
X