Announcement

Collapse
No announcement yet.

Train, Rail and Roller Coaster System

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

  • 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:


  • replied
    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.

    On baking: There's a built in track baker that solves all this for you. Check out the example terrain track map, or the section in the docs about this which can be found at: http://polygonjelly.com/products/unreal/trainandrail/

    If you have any follow up questions after reading that, let me know.
    Thanks,
    PJ

    Leave a comment:


  • replied
    Just figured out how to bake together a track. (dev>MergeActors)
    i was at first surprised that the original pieces of track must still be there as a non rendered object
    + the new mesh must have no collision.=> fine.

    Now i'm wondering what is the most convenient way to have the baked copy of a complex tracke positioned in the proper position ?
    (same as the original parts from which it was baked)

    The "most convenient" process i found was to make a copy of all the elements (while rendered) then bake them together and chose the option "replace Source Actors"
    But even this way: the new created baked mesh was one world unit to the left and one world unit up compared to pieces of track,
    Still it's easy to reposition the track on the exact spot.

    Once done: i select all the pieces of track (the copies) involved in the baking and i set active "Disable Mesh Building"

    Is there a better way to do this ? in a way that the baked track would appear just exactly in the same spot as the merged actors ?
    I tried playing with option "Pivot point at zero" and selecting the 1st piece of track first but it did not helped in streamlining this baking process.

    Streamlining this process can be especially useful when you have to bake and adjust several times your final track.

    Any thoughts ?
    thanks.

    Leave a comment:


  • replied
    Thanks for the quick answer.
    Actually it was not obvious for me that i needed to make a right-click on the white line and press "add spline point"
    so for others wondering posting that here.
    https://i.imgur.com/WcBJZbA.png

    Attached Files

    Leave a comment:


  • replied
    @VR VISIO GROUP
    The terrain track has been updated since the tutorial video was made for launch (1 year ago).
    The red lines you see appearing are the line trace lines, when you move the track it will fire a line to see where the ground is underneath the point.
    The points, are spline points, so just drag a new spline point off your spline to add it to the track.
    Check out the terrain examples map to find a bunch of examples with multiple tracks and options.

    @pixelvspixel
    Thanks, glad you're liking it.
    Yep the objects are moving in the Unreal world as normal, so what ever collision they have will be used.
    If you open the maps with a third person character you can have them walk inside and they will move with the carriage. Same if you throw physics objects in there, they move with it.

    Leave a comment:


  • replied
    Hi
    I'm trying to make the BP_TerrainTrainTrack example. (Unity 4.18.3 or even 4.19 same effect)
    But i have strange effects (red gizmos appearing and then disappearing)
    Also the effect obtained is not the same as in the video explanation (there is no bold pink gizmo at all)

    https://i.imgur.com/0c6uxcA.png
    https://i.imgur.com/HeVJ3a2.png

    In settings i don't see the same options as in the video like "point count"
    https://i.imgur.com/sngxAhl.png

    Also when i drag away the anchor the rail seem to snap to the lowest part of the terrain but it coes not curve properly, just goes straight trough the floor
    https://i.imgur.com/yJj2q91.png

    Can i please ask for help
    Last edited by Ignibit S.A.; 03-28-2018, 10:02 AM.

    Leave a comment:

Working...
X