Unreal Engine Train Tutorial: Follow the Rails

  Рет қаралды 17,424

Seredias

Seredias

Күн бұрын

Hello everyone. This is a quick Tutorial, how to create a Train that follows the Rail.
I used the Version 4.27.1 of the Unreal Engine for this one.
Discord: / discord
Playlist: • Unreal Engine Train Tu...
Train Sound: • Train Ambience - Relax...
Train: www.unrealengi...
Tunnel: www.unrealengi...

Пікірлер: 101
@Seredias.
@Seredias. 7 ай бұрын
I would recommend to set the "Get Rotation at Distance Along Spline" to "World" instead of "Local" 7:50
@gasby_V
@gasby_V 7 ай бұрын
Hi, I'm using the lever tutorial to control the forward speed of a ship. Obviously I have to watch this video first and my question is: can I make my Bluprint Class go back and forth with this tutorial? without using a path?
@Seredias.
@Seredias. 7 ай бұрын
@@gasby_V The Spline is nessesary with this concept.
@Glitcherrr95
@Glitcherrr95 2 ай бұрын
Hey Please help me I cant find the "Path" Object Refrence Type? Using UE5.4 its not there..Unable to move ahead.
@Seredias.
@Seredias. 2 ай бұрын
@@Glitcherrr95 "Path" is the Name of the Blueprint Actor that you should have created right at the Begin 0:20
@TNTMEKKI
@TNTMEKKI 2 жыл бұрын
very nice i make this in my project game like metro game
@ZarconVideo
@ZarconVideo 3 ай бұрын
also, what if we want the train to move from a certain point? for example not from the start of a spline but from a station in the middle?
@Seredias.
@Seredias. 3 ай бұрын
This is Part 2 of the Series: kzbin.info/aero/PLSc29g4OjKUNT2_9nXbKxGEMzq4LnlvNh&si=_w2WfZbxW0nsateN
@deeppixelstudio
@deeppixelstudio 5 ай бұрын
do you have a tutorial for replicating the train for multiplayer?
@Seredias.
@Seredias. 5 ай бұрын
Not yet, will be Part of Season 2.
@hoofdlampje493
@hoofdlampje493 2 жыл бұрын
my default tab isnt showing on the end
@Seredias.
@Seredias. 2 жыл бұрын
Which default tab do you mean?
@hoofdlampje493
@hoofdlampje493 2 жыл бұрын
@@Seredias. on 10:03 i cant select a path or anything just doesnt show up
@solar9969
@solar9969 Жыл бұрын
Hi I have an issue where the train throws the player out after it starts moving how would I fix this ?
@Seredias.
@Seredias. Жыл бұрын
Sounds like a Collision Problem. Are you able to run around inside the Train?
@Random_User190
@Random_User190 Ай бұрын
will it work on unreal 5.3.2?
@Seredias.
@Seredias. Ай бұрын
@@Random_User190 Sure, why not?
@family_in_China
@family_in_China 7 ай бұрын
I have problem, cant do more then one train )) branch error ))
@Seredias.
@Seredias. 7 ай бұрын
I guess you tried two Trains on the same Spline. With this concept you need a Spline for every Train.
@laurentiupolesciuc2817
@laurentiupolesciuc2817 2 жыл бұрын
make a video how to make a controlled car using the Advanced Vehicle System
@enriquebaeza9949
@enriquebaeza9949 2 жыл бұрын
Congrats for 1000 subscribers, I dont understand the cast to node a lot, why do you cast to the third person character. Thanks.
@Seredias.
@Seredias. 2 жыл бұрын
The Third Person Charakter is the Active Charakter in my Case. So the Cast is important to be sure that only the Player Triggers the Event.
@darkestdaysvideogame
@darkestdaysvideogame 5 ай бұрын
Can I somehow get the select path option inside the bp since my level pieces generate on start and are not inside level. Edit: figured it out, you just have to spawn both actors on begin play insde the blueprint you want and after spawning set spline to active path. Now just to figure ot how to make it go backwards
@Seredias.
@Seredias. 5 ай бұрын
To go backwards, you need to subtract the Speed from the Distance.
@darkestdaysvideogame
@darkestdaysvideogame 5 ай бұрын
@@Seredias. And about Timeline, Play from start still or play from reverse? Also I've noticed sometimes my cart/train overshoots the path and teleports to the begging and then plays the path again, any idea whats causing that? Either way, thanks for the input, I was a bit stupid and trying to multiply speed with -1 instead of substracting it with distance. Though I just tried it and it still seems to teleport me and the cart to the begging if I subtract and doesn't do anything after wards instead of playing sound
@Seredias.
@Seredias. 5 ай бұрын
@@darkestdaysvideogame The reverse function needs to be a complete separate function where everything do the opposite. So the timeline would go from 0 to -20
@darkestdaysvideogame
@darkestdaysvideogame 5 ай бұрын
@@Seredias. I see, will give it a go, I did separate it but didn't change the timeline. Also I noticed it doesn't work on lower framerates so I multiplied speed with world delta seconds and it seems to be ok.
@teenagerobotstudio6470
@teenagerobotstudio6470 2 жыл бұрын
Go go go!😃😃😃
@danielzareil2079
@danielzareil2079 5 ай бұрын
😂😂😂
@Emblanefilms
@Emblanefilms Жыл бұрын
Damn. I was hoping this would work for a bus mesh I made. I want to have a bus follow a spline around a city that you can get on and off. Unfortunately i faced 2 issues. The first was the collision trigger to start the bus. It teleports my third person character up the road and the bus dissapears. So I tried plug into event begin play directly but the mesh is facing 90 degrees off. If i manually disconnect the get rotation at distance along spline and input -90degrees into setworldrotation it does correct the angle. But the bus also seems to shudder slowly going through traffic lights that im presuming its collision boxs.
@Seredias.
@Seredias. Жыл бұрын
The Train is a specific Situation. For all other Vehicles I would recommend the AI Car Tutorials as you know.
@Emblanefilms
@Emblanefilms Жыл бұрын
@@Seredias. oh absolutely. I basically gave up trying to make the bus an ai vehicle because the wheels kept falling off. Like I have the bus going around the city on a spline using a timer but that's a tutorial I followed a while ago and it's quite different to yours here. Was hoping to try somehow use some code from yours into mine but I'm just not good enough 🤣
@clebo99
@clebo99 Жыл бұрын
Can anyone post the train sound he has here?
@Seredias.
@Seredias. Жыл бұрын
Train Sound: kzbin.info/www/bejne/ZorZlaCVj8x4hbs
@Rabbit14
@Rabbit14 Жыл бұрын
is the path spline in the center of the tracks or outside of the tracks?
@Seredias.
@Seredias. Жыл бұрын
Depends where the Privot Point of the Train is. In my Case beside the Track.
@TheWeeky
@TheWeeky Жыл бұрын
might be a bit late to all of this but for some reason at the 6:07 part, after i do this tutorial and test how it works my train doesnt move and if i stop the game it shows ("Accessed None trying to read property Path". Node: Branch Graph)
@Seredias.
@Seredias. Жыл бұрын
Did you set the Active Path inside the World? 10:00
@milktar2182
@milktar2182 8 ай бұрын
I'm having the same issue too. Did you manage to fix it?
@sosenkazpolski5884
@sosenkazpolski5884 Жыл бұрын
I can't set the path for it, it doesn't have that part in the "Default" section of details panel. Everytime I step into the box collider, I get this error in the output log: "PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property ActivePath". Node: Branch Graph: EventGraph Function: Execute Ubergraph Train BP Blueprint: Train_BP LogScript: Warning: Accessed None Train_BP_C /Game/FirstPerson/Maps/UEDPIE_0_FirstPersonMap.FirstPersonMap:PersistentLevel.Train_BP_C_UAID_7C10C9251A3C4C9C01_1925784277 Function /Game/Blueprints/Train_BP.Train_BP_C:ExecuteUbergraph_Train_BP:007C PIE: Error: Blueprint Runtime Error: "Accessed None". Node: Branch Graph: EventGraph Function: Execute Ubergraph Train BP Blueprint: Train_BP"
@Seredias.
@Seredias. Жыл бұрын
Did you set the Active Path Variable public? 3:15
@henrycooper8486
@henrycooper8486 2 жыл бұрын
This is amazing, thank you so much for this beautiful tutorial! Would it be possible to do this in VR as well? For example replace the third person actor with VR? Kind regards :)
@Seredias.
@Seredias. 2 жыл бұрын
Sure, should be working.
@henrycooper8486
@henrycooper8486 2 жыл бұрын
Thanks :)
@henrycooper8486
@henrycooper8486 2 жыл бұрын
Hi again :) would it be possible make the train move at play start along the spline with the character inside of it without needing to go through the trigger box? And if so how would you do it? Kind regards :)
@Seredias.
@Seredias. 2 жыл бұрын
@@henrycooper8486 Thats pretty easy, just replace the "On Begin Overlap" with the "Begin Play" Event.
@henrycooper8486
@henrycooper8486 2 жыл бұрын
You're amazing thank you so much! :)
@KingofGod2
@KingofGod2 2 жыл бұрын
Sir how to make train traffic system ??
@Seredias.
@Seredias. 2 жыл бұрын
Traffic with other Trains or integrated with the Car Traffic?
@lildeetime745
@lildeetime745 2 жыл бұрын
Hey I need help on making deformable cars like beamng drive for online games please
@Seredias.
@Seredias. 2 жыл бұрын
I worked on that since a while now, but I dont get a good Solution for this. I will let you know if I get something.
@DJenriqez
@DJenriqez Жыл бұрын
I know there is not certain definition of AI, but I would not call making train running on actor enter zone AI
@Seredias.
@Seredias. Жыл бұрын
How would you call a self driving Train, that is not controlled by a Player? Especially in the further Parts. The Collision Box just starts the AI.
@DJenriqez
@DJenriqez Жыл бұрын
@@Seredias. From developer perspective its traing controller by animation node,... (from customer side maybe its AI) ? Even in real life most of autonomous trains are controlled by electric switches and levers, not AI decision... (security norms). Cars in GTA series can be considered AI. But this definitelly not....
@Seredias.
@Seredias. Жыл бұрын
@@DJenriqez From the developer perspective you are right. A Train can't be an AI cause it has to follow a Static Route. Only the Speed could be calculated based on Static things ( Train Station, Curves etc.). Since I also have an AI Car Tutorial Series, where the Car has to make decisions based on the Environment, I will rename this Tutorial.
@DJenriqez
@DJenriqez Жыл бұрын
@@Seredias. thanks, it is really misleading, I came here because of some AI in unreal to check how it works and I found train following static route :)
@wolkerwolkerovich8591
@wolkerwolkerovich8591 2 жыл бұрын
Definitely like. Thank you for the video. If you can still have a lesson about trains. Interested in stopping, looping the movement. Thanks.
@Seredias.
@Seredias. 2 жыл бұрын
Of course this will be an Tutorial Series.
@EthanFilms
@EthanFilms 2 жыл бұрын
How can we store a spline we create within the landscape editor as a variable so we can do this? It'd be super useful, as I've already used it to make a big railroad on my map
@Seredias.
@Seredias. 2 жыл бұрын
Unfortunately it is not possible to use the "Landscape Splines" inside the Blueprint. I tried that too and was disappointed as well.
@sofreshprod
@sofreshprod 2 жыл бұрын
@@Seredias. we all tried that ah ah ah
@dieterlau2816
@dieterlau2816 Жыл бұрын
thank you, Danke
@suryakamalnd9888
@suryakamalnd9888 2 жыл бұрын
Cool video bro!! Can you redo this in unreal engine 5?
@Seredias.
@Seredias. 7 ай бұрын
There is no different between UE4 and UE5 in this Case.
@ZarconVideo
@ZarconVideo 3 ай бұрын
this worked really well. question. what if we wanted the train to go in reverse? what would I need to change?
@Seredias.
@Seredias. 3 ай бұрын
That would be a new function, that needs to subtract the Speed from the Distance.
@ZarconVideo
@ZarconVideo 3 ай бұрын
@@Seredias. yup that did it!
@TheKr0ckeR
@TheKr0ckeR 5 ай бұрын
Exactly what i needed! Thanks for your effort. Are we doing slow-down effect later on? When we close the lever, it shouldnt directly stop, but with a slow down effect. My game will be full of trains so i need a good asset pack for rail-road & splines. Do you have any recommendations to that? Another question is how would we do that inside Tick? So instead of delay, i want to be able to move my train in Tick(); but it needs to accelerate like we did with timeline, any tips?
@Seredias.
@Seredias. 5 ай бұрын
Yes, the slow down effect is part of the Train Station Part. Also the Lever and Carriages Part will be interesting for you. Just follow the Playlist.
@TheKr0ckeR
@TheKr0ckeR 5 ай бұрын
@@Seredias. Thank you, are there any way to edit Timeline's max value via blueprint? Since i want to edit my max speed from a variable, i dont want to go timeline and change last frame.
@teenagerobotstudio6470
@teenagerobotstudio6470 2 жыл бұрын
Please show me how to control the car according to your settings, I can't find a video lesson on how to make the car grip the surface and set your maximum speed, answer me if you can help with this😫
@itzrajgoyal
@itzrajgoyal 7 ай бұрын
Bro Please Help! My Train Goes 90% i Do Now Know Why I Tryied Rotating But Noting Works Please help, Whatever I Do I Just Goes backwards, It Just Goes Opposite the direction I Give
@Seredias.
@Seredias. 7 ай бұрын
I think this here should help: kzbin.info/www/bejne/rWjFh5ufoJWHj7Msi=CN5mKQWPnWTjV--5&t=60 In this way you can rotate the Train inside the Blueprint Actor.
@itzrajgoyal
@itzrajgoyal 7 ай бұрын
Thanks For Helping ,@@Seredias. You'r Such A Wonderful Content Creator 😊
@itzrajgoyal
@itzrajgoyal 7 ай бұрын
@@Seredias. No Bro It Didnt Worked Out, After I Place My Carriage And Train bp they are well placed at first but when the train starts they change their location , This the the only prob im facing. Thanks
@Seredias.
@Seredias. 7 ай бұрын
@@itzrajgoyal I forgot to say, I would recommend to set the "Get Rotation at Distance Along Spline" to "World" instead of "Local" 7:50
@CommanderColson
@CommanderColson 6 ай бұрын
It works but is really stuttery. Is there any way to fix the stutter?
@Seredias.
@Seredias. 6 ай бұрын
Yes, this get fixed in the next Parts.
@CommanderColson
@CommanderColson 6 ай бұрын
@@Seredias. When? There are a lot of videos
@Seredias.
@Seredias. 6 ай бұрын
@@CommanderColson There are 7 Videos in the Playlist, I wouldn't call that a lot, but anyway in this Part here at 8:26 you will find a summary: kzbin.info/www/bejne/Y5_dgaaefLKGiLMsi=WgYVlqqv32CTd_NO
@suryakamalnd9888
@suryakamalnd9888 2 жыл бұрын
Bro can you make a tutorial for a drivable train for train games?
@Seredias.
@Seredias. 2 жыл бұрын
Good Idea, I will do.
@suryakamalnd9888
@suryakamalnd9888 2 жыл бұрын
@@Seredias. thanks!! That should be very useful for my game...
@muhammadzeeshannaeem1918
@muhammadzeeshannaeem1918 Жыл бұрын
i did same , everything is working except Sound , Sound doesn't play when train Travels please help
@Seredias.
@Seredias. Жыл бұрын
Did you add an Audio Component to the Train Blueprint and set the Wave Sound inside the Details?
@muhammadzeeshannaeem1918
@muhammadzeeshannaeem1918 Жыл бұрын
First of Alla thanks for this series i'm your subscriber and video Liker at firsrt i got 1sec of train sound i converted it in WAV then i uploaded in UE project Then i did same added "Audio" Component into Blueprint actor and placed it in the train as the details shown in this video 3:45, i selected that Train sound and set "1 to 0" in "Volume Multiplier " in the details of Audio Component then i coded same as you, but audio isn't playing when i set Volume Multiplier 1 in the audio component details it only playes single time, please help @@Seredias.
@Seredias.
@Seredias. Жыл бұрын
@@muhammadzeeshannaeem1918 Ah I think I know what the Problem is. Open the Wave File in Unreal Engine and check "Looping" to true.
@muhammadzeeshannaeem1918
@muhammadzeeshannaeem1918 Жыл бұрын
OMG, you actually fixed my problem. Thank you soo much brother
@lazertiger-to6vt
@lazertiger-to6vt 4 ай бұрын
I dont know if something changed due to the versions, but if u find trouble finding the float < float or float + float, just put < or + depending on what ur looking for, and ull find them
@Seredias.
@Seredias. 4 ай бұрын
Your right, this is one of the Main Changes between UE4 and UE5.
@jefffolkes1722
@jefffolkes1722 Жыл бұрын
Is there still a way to grab the tunnel assets?
@Seredias.
@Seredias. Жыл бұрын
Oh that's strange. I see that it is unavailable in the Marketplace, but I still can use it. Hopefully the Creator will activate it again.
@jefffolkes1722
@jefffolkes1722 Жыл бұрын
@@Seredias. Anywhere else I could look for those Assets?
@Seredias.
@Seredias. Жыл бұрын
@@jefffolkes1722 I don't think so, but to be honest I don't know.
@dsddsdd-e6s
@dsddsdd-e6s Жыл бұрын
Your explanation is very nice...and I am enjoying it. Could you send me the train file? Because I can't buy it
@Seredias.
@Seredias. Жыл бұрын
Since Im using a Content Pack from the Marketplace which Im not the Creator of, its not possible to share it.
@ambro44
@ambro44 Жыл бұрын
@Seredias. I am having trouble with keeping my train a consistent speed. I have it set to get to 20 speed after 5 seconds, it speeds up then after 5 seconds hits, it suddenly slows down and stays at a consistent slower speed. any idea why?
@Seredias.
@Seredias. Жыл бұрын
Yeah that's kind of a Bug in this System, sorry for that. Its better to use an Tick Event to set the Position. I show that in this Part: kzbin.info/www/bejne/Y5_dgaaefLKGiLM
@ambro44
@ambro44 Жыл бұрын
@@Seredias. Thanks for the quick reply :) curious, have you tried using a lerp function? I have my train moving around the spline via lerp and it's speed is consistent, but it doesn't slow down when it hits the collision box from your part 2 tutorial. Would this not work with a lerp for some reason? Train collision is set to enable overlap functions.
@patricljung3710
@patricljung3710 2 жыл бұрын
Nice tutorial on using splines to move the train. However, I wouldn't call it an AI Train, in which I expect the use of AI Controller, Behavior Tree, BT Tasks and a Movement Component on the Train. Sorry for nagging, but I've seen far too many videos about "AI" this and that in Unreal which are not really AI or NPC pawns/characters.
@Seredias.
@Seredias. 2 жыл бұрын
Technically you're right, but this is just the Begin of the Tutorial Series. So it will get more complicated.
Unreal Engine Train Tutorial: Trainstation / Track Looping
7:19
How I Remade MW2 with Unreal Engine 5
12:37
reubs
Рет қаралды 3,1 МЛН
Worst flight ever
00:55
Adam W
Рет қаралды 26 МЛН
WORLD BEST MAGIC SECRETS
00:50
MasomkaMagic
Рет қаралды 53 МЛН
Games with empty worlds.
18:52
The Cursed Judge
Рет қаралды 1,8 МЛН
AI Cars learn to drive - UE4 Blueprints
9:15
Slothful Studios
Рет қаралды 39 М.
Unreal Engine Train 2.0 Tutorial
12:08
Seredias
Рет қаралды 2,7 М.
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 4,9 МЛН
10 Unreal Engine 5 PLUGINS I can't live without!
9:37
Cinecom.net
Рет қаралды 547 М.
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 497 М.
Why Do Video Game Studios Avoid Blender?
6:49
The Cantina
Рет қаралды 593 М.
Unreal Engine Train Tutorial: Carriages
7:25
Seredias
Рет қаралды 5 М.
Unreal Engine Train Tutorial: Door Animation
10:52
Seredias
Рет қаралды 4,1 М.
Worst flight ever
00:55
Adam W
Рет қаралды 26 МЛН