Announcement

Collapse
No announcement yet.

Train with multiple axles on a spline?

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

    #31
    Originally posted by Sly401 View Post
    My own project has and is still being adapted / tuned
    Your videos look awesome, so much attention to detail.

    In the "slot car" analogy, would the "pin" be guided by the "slot" in the track by actual physics or following the spline (i.e. get location / rotation along the spline)?
    [Marketplace] Loading Screen System (ᴘʀᴏᴘᴇʀ ʟᴏᴀᴅɪɴɢ sᴄʀᴇᴇɴs, ɴᴏᴡ ᴡɪᴛʜ ᴘʀᴏɢʀᴇss ʙᴀʀs)
    [Free][Script] Automate Download of Mixamo Animations
    [VłĐɆØ] Performance: BP vs C++ vs Blueprint Nativization

    Comment


      #32
      old thread but always interesting topic. I also need tracks (rail). From where you got those rails which you implemented in your level ?
      Last edited by routedeturin; 09-27-2017, 12:46 PM.

      Comment


        #33
        Hmm so even if we do adjust the spline point curves, the train wheels will still derail all off the track and fall down like Big Riggs Off The Road Racing. A pity I thought adding in more spline points would fix that, but I do remember years ago when attempting this as well with the Keyframe system in the Red Engine (old game engine) we had to use the standard
        moving keyframe to move the train as well as to use a rotating keyframe to get the train to rotate slowly around the bend of the track as its moving.


        Comment


          #34
          Originally posted by DasMatze View Post
          Well, physics are no option at all as you can see:
          I wanted to do a game map in Unreal Engine with some coal carts that go around a couple of 8 figure tracks. So that might be more tricky because it has more than 1 bend in that type of track. So I need to get that system to try to work. So can I get ahold of that little demo of your Train cart to have a play around with the mover spline system that it uses? Because I don't yet have a tutorial on how to set up the mover spline system for doing moving small coal carts to get them moving along train tracks.

          But I think trying to do it with the physics on in the engine may involve too many other variables to cause the wheels to want to always fall off. You could
          also add in more or less KG MASS also to the cart and see what happens to it if using physics, it might cause it to stay more firmly on the tracks or not. So I think to get the cart to turn the wheels on the track without it falling you might need to animate the cart turning slowly all around on the track in an animation program.

          But I do remember way back in the days of Red Engine, we used a Keyframe pulley system for moving and rotating things. So for this sort of thing to get a cart to travel and turn around bends, we had to add in all the keyframes first for the whole entire route of the track, the cart would travel along then go back and add in rotation keyframes at each bend with a time delay to tell the cart how quickly to turn around the track.
          Last edited by tozan; 09-29-2017, 02:29 AM.

          Comment


            #35
            After using this system, which I find quite unflexible in terms of train configurations, I ended up creating my own system from scratch with all that I've learned since I've created this topic. It works quite good so far:
            (please excuse the shoddy camera work)

            The train is set up in levels which determine the order in which they are updated:


            Each frame an actor in the world, called the "TrainManager", takes all wheel references from it's pre-runtime constructed array and calls a function in the wheels to advance on the spline relative to their speed and direction. Afterwards the other levels of the train are positioned according to the position of their children/previous levels. That's basically it.

            This also means your wheels will move out of the bogie if you change a switch while one of the two axles has passed it. So far there are no functions for locking switches, adding cars (this test train is one unit) or looking ahead of the train to avoid collisions or recognize signals.

            It's WIP and currently I'm working on something else but even if I was working on it, I don't intend to share it, as I made it for my own game's requirements. But maybe this little insight helps some of you getting your own trains running.
            Last edited by DasMatze; 09-29-2017, 05:35 AM.

            Comment


              #36
              Okay, So the Railway System that Sly401 has been working on is very intense. In Fact I'm still trying to get help building a prototypical steam locomotive for UE4 so I can start my own Railway Simulator.

              Comment


                #37
                Been a while since I visited this thread. I hope there's something that the community can use by now.
                Originally posted by DasMatze View Post
                After using this system, which I find quite unflexible in terms of train configurations, I ended up creating my own system from scratch with all that I've learned since I've created this topic. It works quite good so far:
                (please excuse the shoddy camera work)

                The train is set up in levels which determine the order in which they are updated:


                Each frame an actor in the world, called the "TrainManager", takes all wheel references from it's pre-runtime constructed array and calls a function in the wheels to advance on the spline relative to their speed and direction. Afterwards the other levels of the train are positioned according to the position of their children/previous levels. That's basically it.

                This also means your wheels will move out of the bogie if you change a switch while one of the two axles has passed it. So far there are no functions for locking switches, adding cars (this test train is one unit) or looking ahead of the train to avoid collisions or recognize signals.

                It's WIP and currently I'm working on something else but even if I was working on it, I don't intend to share it, as I made it for my own game's requirements. But maybe this little insight helps some of you getting your own trains running.

                That switch system is actually something very close to what I am hoping to find in a train setup. Just that the difference would be that it can be changed with a mouse click, or by a character model that the player would control (exiting the cab of a locomotive) and then throwing a switch mechinism. Sadly I saw that you won't be sharing the system at all, so there goes that hope that I'd be able to somehow obtain what you've created.

                It's a real shame that there's no good user created systems that you can find for UE4, even this many years after the engines public release. Pretty bummed.

                Not sure if any of the UE4 Devs will ever see this, but if any of you do. Could someone on the team please create a system to use when wanting to create railway systems in the UE4 engine? At this point I sadly cannot hope to see someone in the community do something like this, and I am not a very coding geared person (tried to be, but don't have the right brain for it). So I doubt I'd even know where to start with any of this.

                Comment


                  #38
                  Originally posted by DasMatze View Post
                  After using this system, which I find quite unflexible in terms of train configurations, I ended up creating my own system from scratch with all that I've learned since I've created this topic. It works quite good so far:
                  (please excuse the shoddy camera work)

                  The train is set up in levels which determine the order in which they are updated:


                  Each frame an actor in the world, called the "TrainManager", takes all wheel references from it's pre-runtime constructed array and calls a function in the wheels to advance on the spline relative to their speed and direction. Afterwards the other levels of the train are positioned according to the position of their children/previous levels. That's basically it.

                  This also means your wheels will move out of the bogie if you change a switch while one of the two axles has passed it. So far there are no functions for locking switches, adding cars (this test train is one unit) or looking ahead of the train to avoid collisions or recognize signals.

                  It's WIP and currently I'm working on something else but even if I was working on it, I don't intend to share it, as I made it for my own game's requirements. But maybe this little insight helps some of you getting your own trains running.

                  Forgot to ask in my last post, but did you use Blueprint for this? Or were you using written code?

                  Comment


                    #39
                    I would imagine the game might be finished by now ? was it released?

                    yeah, I'm trying to do this as well, using blueprints, but it's hard to know where to start

                    this looks like a good hit though , although I would have a question, does that mean that the train was 1 skinned asset ? or wheel, bogey and train were all separate ?
                    https://forums.unrealengine.com/file...QlvP0i9Dk7noNk

                    Comment

                    Working...
                    X