@@김효신-l1s @김효신 The "Set Target Gear " Function is part of the Vehicle Movement. If you want to use a Vehicle Movement Function, you need "Cast to Chaos Vehicle Movement" first.
Thanks for the tutorial not sure why this didn't pop up for you but I was getting access none errors following your guide so I had to do assign a value to Path variable. I used a get actor of class node to get the reference.
i have an issue. When my car turns it slips off the path and crashes into the wall, despite the fact that the spline is following the track. How do i fix it? SOLVED: There was not enough of a downward force on it. Multiplied downward force coefficient by 100
Dear Seredias, everything was resolved with the transition to version 5.4. On version 5.2, even in the final draft of the race, the UE car, converted into AI, crashed into an invisible obstacle. With the new version of the engine everything worked like clockwork
I'm using UE 5.4.4 and can't seem to find the "path - object reference' variable. I thought the replacement variable could be spline component object reference, but that won't work either. any ideas?
i did exactly as shown in the video, very clear i wanna say! But i have an issue with my spline, the car will follow the path for like 5 meters and then it will start to do 360 degree turns lol any idea how to fix this? i'm on ue 5.3.2
This happen when the Car is not able to calculate the direction. Reasons can be: 1. The Spline is not on the same height as the car. 2. The Spline has a very sharp angle. 3. The car is at the end of the Spline.
Hi there @Seredias So everything worked until I placed "Path" blueprint on the world, and there is no spline points (spline points are visible in the Blueprint Editor). Any ideas how to fix that?
hi in the end i can't find "Default> Active Path" can you help me? Blueprint Runtime Error: "Accessed None trying to read property ActivePath". Node: Return Node Graph: GetPath Function: Get Path Blueprint: carro-ai
@@Seredias. thank you! but now i have this: Blueprint Runtime Error: "Accessed None trying to read property ActivePath". Node: Return Node Graph: GetPath Function: Get Path Blueprint: carro-ai
@@Seredias. Heck even I'm getting the same error, along with no spline points 4:21 and no active path select option 4:48. "Active Path" is public!! P.S. It's version 5.1.1
Hi!!! 2 questions I went through some of your videos on this topic and I realised that you (as well as several UE5 tutorialists) did a lot of Car AI stuff without utilising the AI behaviour tree and Blackboard systems found in UE5. I want to ask whether it was a creative choice or if there was a specific reason you used these methods over those. Is there a specific reason for it? Question 2 I tried with a first spline and it worked but steered too early before it got to the bend. I then deleted it and made another spline but the car ignored it and drives in circles (the active path is always set) and it ignores every spline i make Why is it doing this and can i fix it?
Yes, there is a reason for that. The Behaviour tree and Blackboard only works with an Charakter Blueprint, which has the Charakter Movement or Floating Movement. The Wheeled Vehicle Class can't use those AI Functions cause it's a complete different Blueprint Class with his own benefits like realistic Vehicle Movement.
Thanks for the tutorial, but I think you should explain a little bit, what are you actually doing and why, not just plant one node after another without any explanation of what it does. Especially for new users it would be much more helpful.
I know what you mean, but I can't satisfy everyone, cause on the other hand you have the avanced Users, who want it straight to the point. My focus is to find a good way for both. Me personally like it straight to the point as well. If I see a Tutorial with 30 Minutes and more, I don't wanna watch it. If I don't understand a Part of a Tutorial, I research it by myself.
@@Seredias. I don't mean to do indepth explaining of individual nodes, but you should at least to mention, why are you adding that 200 value to the vector (for instance). That would take like 5 seconds extra. Then add debug sphere on the position of the final vector and suddenly it would be much easier for everyone to understand, and it would only take an extra 30 seconds or so.
Ok, so this works great. But, if I spawn a car into the world, then give it the reference to the spline, and a Speed to start off at, it doesn't do anything. Any idea why? Steps the recreate issue... Set a Spawn Actor of Class (of type AI Car or whatever your vehicle is called) node on a Begin Play in another BP. Set the location to be at the start of the spline. Then set the Path Reference and Speed right after the Spawn node. The car will spawn in, but it won't move. I've done Print Strings to make sure it has the correct Path reference and Speed. It does, but still refuses to budge. Any clues to what I'm missing?
@@Seredias.Thanks for the response. No I figured it out... in the class settings, I had to change the 'Auto-Possess AI' option to 'Placed in World or Spawned'. Can't beleive this caught me out yet again! I've done this multiple times before.
Hey Seredias. So i wanted to copy this blueprint into various different type of vehicles. And have the vehicles follow along 3 - 4 different paths like in your earlier traffic/change paths tutorial. I think you had an integar which allowed for selecting different paths in details panel. But this code doesn't give option/integer for multiple paths. I am just wondering how i can have the option to change it's path to different splines?
Hello, I'm on the same unreal version as the tutorial, however the "default" menu to select "Actor path" doesn't appear for me. Is there something I need to do to enable it? Followed every step verbatim. Edit: Managed to find it by opening the property matrix however when I try to select "path" it doesn't confirm my selection, any way to fix this?
When I drive up to one of the AI cars and look at it for 3-5 seconds, it crashes into an invisible wall. But if I follow them, then everything works as it should. I can’t imagine why this is. Seredias, any help please🙏
Im tired ive done this 3 times flawless but when i try to make more than 1 path component for different cars of coarse only one ever shows up which is fucking stupid this is the dumbest engine ive ever used
What do you talking about, you just need to place multiply Path Actors inside the World and select them in the Details Window for different Cars. It's that simple.
Currently trying to make the same car made in this video spawn in and follow the path. I tried to follow one of your tutorials about car spawns but that was too complicated for the thing that I'm doing. Any advise?
The simplest way would be to create a Blueprint Actor "Spawn". Place the Actor where the Car should Spawn. On Begin Play use "Spawn AI from Class" and choose the AI Car.
@@Seredias. I'm having the same problem. I already double-checked my "Get Path" function and it is the same as the video. I feel like it maybe has to do with the turn handling in the car not being good enough to handle sharp turns, even at very low speeds, so it sort of swings wide and then overcorrects, resulting in a bit of swerving. Any advice on how to improve the handling?
@@emilyporterfieldart Well the swerving side to side definitely shouldn't happen. Since this Tutorial is 1 year ago, I double checked everything now and its still working without any problems. But you can improve the accuracy by reducing the tolerance (The float after the Normalize) or place an arrow component on the front of the Car and get the World Location of this Arrow instead of the Actors Location.
Hey sir, do you know a way to make a car AI chase the player until it stops or obstructs it? Just like the police cars in Need for Speed monster Wanted.
That's actually very complicated. I already make a Tutorial about it. Its not perfect, but describes the concept: th-cam.com/video/hX6NX-Vgqw0/w-d-xo.html
@@devzonic288 There is actually no Specific Number, but I can say, many more. There are so many ways to extend it. Maybe it will go more to survival game.
Hi @seredias i dont understand the logic in the part where you mention find tangent closest to world location and then normalize why is that required ?
@@Seredias. not a custom car! but that reply still helped me solve it. so, thank you! the only thing I did different was add a skeletal mesh otherwise the Ai car don't show up ... but there was no animation Blueprint in Anim class, so I added the sportscar bp... sorry I'm new to unreal is this a proper fix? or is it going to give me issues and slow me down later? .. like when I want the cars to appear different .. or do I just copy and paste the ai car and change mesh and Anim blueprint?
@@TheTooTurntTahj If you're using Version 5.4 of the Unreal Engine, you need to copy the VehicleAdvPawn, which is the parent class. Its not possible to just change the skeleton mesh, since many content Packs have there own structure like different bone names etc. So to get different Vehicles you can use Content Packs like this here: www.unrealengine.com/marketplace/en-US/product/9a705589d1994c6e8757fdbedaf698af or make a custome Car: th-cam.com/video/Z_BgNXtHQww/w-d-xo.htmlsi=LhJpQYpFOUPDXZ_8
This tutorial is great! I am encountering a very strange issue though, and for the life of me I cannot find what the error can be. I followed this tutorial twice for two separate projects, and the first one I had no issues. The second one, however, while the AI follows the path and steers beautifully, for some reason the car will just abruptly stop out of nowhere at random, and then proceed again a few seconds later. The AI blueprints are, minus some variable names, are identical between the two projects, and I confirmed my vehicle's settings are the same as what you have in the video (automatic transition, etc). So I'm at a bit of a loss as to what could possibly be causing the car to suddenly stop out of nowhere. I would've just reused the first project since it's working there, but it's a situation where while they both use vehicles, the games being made are so drastically different that it was easier to start from scratch than to copy the project and strip out the unnecessary parts. Tracking their variables with some debug commands and whatnot, the steering and throttle are appropriate being applied to the AI cars too. Like the throttle doesn't just become zero out of nowhere for example, even when they stop. Is this an issue you've encountered before, and if so, do you happen to have an idea of what the error could be?
Since the function is just calculate the Steering, this can't be the Problem. Are the Cars the same in both Projects? My first guess was, that something in the World block the Car (Invisible Collision), but since it's continue driving after a few seconds, it's sounds more like strange configuration of the engine.
@@Seredias. So I'm not 100% sure about this, but I think what's happening is that they're stopping whenever they're off-camera. If that is what's causing it, it's definitely not consistent, it's just the most consistent repro I've got for the bug. I'm not sure what setting could possibly affect that though.
@@freedomhindi4949 As I said this Problem come from something else. I would recommend to try this inside a complete new Project (Vehicle Template) with the default Sport Car.
i think its happening because its trying to stay on the spline line and it is over correcting to the other side and thats causing the serpentine line im having the same thing
HELP!! It keeps stopping while running. (If you stop, the wheel doesn't rotate and goes forward.) If you stop again and start, it stops again as if it's under constraints. How can I solve it?
@@Seredias. not really bro , basically using your Ai spline ,record in sequencer , but i manage to make it in triggle custom event take , just dont sure how to fix the handling of the car when the speed go faster , the turning didnt follow the path well. Do you have any advice for making the car turn closes to the path ?
@@spvs8914 Of course when you drive to fast into a turn, the physic of the Car will push it outside the Spline. So basically you need to slow down in corners. You can trigger that inside the scene for example.
Thank you for your nice Tutorials, I am since 1998 3d Artist in the automotive industry and since last year I try to learn unreal 5 after some years experience with unity. The blueprint thing seems to be very innovative, but in the beginning it's hard for me to understand this programmer logics. Your Tutorial is good, it runs exactly like your example now. So my question is, when I duplicate path and Ai car in the world brower, go get a second car that drive as on coming traffic in reverse direction. How can I do this, my second car everytime turns around on the second spline and drives in the same direction of the first car.
@@Seredias. Thank you, again, but it doesn't work, I try to make your tutorial step by step again next time, maybe some parameters are buggy in my scene. By the way, what do you this about the plugin "Rush Hour" for UE5,
seredis,sorry to border you again , i sue the sport car it works , but when i change to custom car , the rig and everything fine in the game mode, once i apply the step ,the car just stop and not moving at all in the simultiaon , any clue ? ? sorry to border
is ok , found the problem , is the mass of the car too heavy causes the 0.5 throttle value not enough to accelerate .... lol , i can the mass or throtter higher it works
Unfortunately no. the steering input will always attempt to face the front of the car in the same direction as the spline, meaning that if you have it going in reverse it will turn the opposite direction at turn points and then go that way forever. @@Seredias.
Well of course I tested that before and it works as expected. Like in the Tutorial I placed an Path inside the World, placed the AI Car at the Begin (the Direction of the Spline is very important as well), turn around the AI Car and set the Brake Input instead of the Throttle Input.
I really like this video but I have a problem. I want to scale the car down to .05 but the problem is that when i run the program, the car flies above the ground. I can't seem to keep the car on the ground. it takes off and flies along the path of the spline. Help
Hey there. I seem to have the same issue as a few others. I followed your tutorial exactly, and the car does not follow the spline. Just drives forward no steering. I am using one of the vehicles from the free market place selection (VehicleVarietyPack). And also I have indeed set the default to Path @4.44. Any ideas? Thanks alot for your tutorials btw!
If the Car don't follow the Path, the could only be two reasons. The Get Path function have to be called and the Set Steering Input has to connected 4:04. And as you said right, the Path has to be set for the Active Path Variable.
@@Seredias. Thank you for your quick reply!! It was actually neither. I unticked enable tick on start! So that was the issue. I always worry about using the tick function. Working now, thank you very much! Would there be an alternative to update the steering instead of event tick do you think?
Of course, you just need the Vehicle Template. Than go to Project Settings -> Maps and Modes and choose the Vehicle Template. The Auto assagin is more for testing. You can use a Player Start as well.
In this Case I would recommend this one: th-cam.com/video/rH_0PLMGmJw/w-d-xo.htmlsi=b_hhaBzQWAlz70T1&t=250 At the 4:10 you can find what you need. It still works for UE5.
I followed everythink as close as I could but the car is not following the spline. I am really stuck here. Can this happen because of anything specific?
What do you mean with "not equipped"? If you mean, that you want to drive any Vehicle resource in the World, you need to convert it first: th-cam.com/video/TItjnI4A0io/w-d-xo.html
Did you copy the Spline inside the World or in the Content Browser? Since this function only calculate the Steering, the Problem came from something else.
Hi bro. thank you for video.I have Question I done every thing seam this video but my car going revers. can you help me please how can I do for solve that?
Dear Seredias Do you know how can we get speed or acceleration of car during the game and save it every one second and then export it? In other words how we can get vehicle data and save it in data table I wish you had a video fir that
Interesting question. Unfortunately there are only 2 ways to combine external Data with the Unreal Engine. First you could write a custom c++ function that can handle csv for example. Or there are many code plugins to convert files. For both solutions exist many Tutorials. Since I don't have much experience with them, I cant recommend a specific one.
Not now, since the UE5 still has to many Bugs and is not compatible with most of the Content Packs. The Update Tutorial should answer all questions that came up since the Original Tutorial was released. Also nearly all of my UE4 Tutorials are compatible with UE5.
Very nice tutorial. if I would for example duplicate your car and want to have both driving at the same time, and following different splines, could I just duplicate the spline actor and draw a different spline for that and point the second car to it? Because I tried and it doesn't work. Duplicating the AI_Car works fine. Just call it AI_Car_2 and it has all the set up work done in the Event Graph etc. But duplicating the Path actor didn't work. The AI_Car will follow Path no problems. But AI_Car_2 will not follow Path_2. What needs to be done? make the Path actor from scratch instead of duplicating? Because everything else is the same. if the solution is making the path actor again from scratch, why is that needed? Thanks!
I guess you duplicated the Path inside the Content Browser. There is the Problem. The AI Car has a reference Object called "Path". So to create a second Path, just place "Path" object again inside the World and set it inside the Details of the second car.
@@Seredias. I see. But it being a copy, could I still change the direction of the path/spline and it would work independently from the original? Like having multiple copies with different splines.
You need to uncheck the "Automatic Transmission" under the Vehicle Movement, than get the Vehicle Movement inside the Event Graph and use the "Set Target Gear" Function to change the Gear to 0 (Neutral). I also have a Tutorial to explain it: th-cam.com/video/5Cam9_dIEP0/w-d-xo.html
Thank you for replying but i already did that but the car would not roll down a steep inclined and also can you give any tip for creating a clutch system in unreal engine Vehicle
I would like to, but there is not implemented way inside the UE4 to do that. But with UE5 they integrated it from the Engine itself. I try to figure out how they done it, but its complicated.
You can use the "Calculate Distance" Function for this and check if the Position is lower than before. If that happen you can gave the Player some points.
@Seredias I really needed this! I have an issue though, I need the car/s to go much, much faster when I do so there they an issue going in a straight line and also sticking to the path is there a fix for this you can suggest? > th-cam.com/video/Kwjf7M26eOk/w-d-xo.html also; when I try to simulate instead of pressing play, the Ai car doesn't move do you know why and is there a fix for that also please?
What did you change to make it faster? The answer why it doesn't move when your simulate is simple. It runs on the "Event Begin Play". PS: Could you give me a favor and remove the link from the Comment. TH-cam itself usually block links in the Comments.
If you want to speed up the AI, you can set the gear with "Set Target Gear". Be sure that "Immediate" is true.
Where is Target Gear? Help me, cool guy
@@김효신-l1s @김효신 The "Set Target Gear " Function is part of the Vehicle Movement. If you want to use a Vehicle Movement Function, you need "Cast to Chaos Vehicle Movement" first.
Thank you, you and another UE TH-camr have made the last Audi video on my TH-cam Channel possible.
Thanks a lot, so easy and direct to the point!
Thanks for the tutorial not sure why this didn't pop up for you but I was getting access none errors following your guide so I had to do assign a value to Path variable. I used a get actor of class node to get the reference.
Yes, you will get this error if you didnt assign the Path at 4:46.
good eye I knew something was up I completely missed that step. That you so much for responding! @@Seredias.
missed the same haha@@LocoTony64
GG
You are great! This is exactly what I need.
i been trying but still fail
Legend thankyou for this quick solution!
i have an issue. When my car turns it slips off the path and crashes into the wall, despite the fact that the spline is following the track. How do i fix it?
SOLVED:
There was not enough of a downward force on it. Multiplied downward force coefficient by 100
Did you try to reduce the Speed?
@@Seredias. yes
@@rohanphadnis6812 And you deactivated the automatic Transmission? Because it sounds like the Car is too fast in the curve. That's why it slip.
@@Seredias. yes, it is disabled.
@@Seredias. Thank you, I have solved it!
This worked! Oh lawd it worked.
Dear Seredias, everything was resolved with the transition to version 5.4. On version 5.2, even in the final draft of the race, the UE car, converted into AI, crashed into an invisible obstacle. With the new version of the engine everything worked like clockwork
good work :) this guys work is solid .
Wow, superb, thanks!
Awesome Tutorial!!
I'm using UE 5.4.4 and can't seem to find the "path - object reference' variable. I thought the replacement variable could be spline component object reference, but that won't work either. any ideas?
@@jossoldham9263 "Path" is just the Name of the Blueprint Actor that you should create right at the Begin.
i did exactly as shown in the video, very clear i wanna say! But i have an issue with my spline, the car will follow the path for like 5 meters and then it will start to do 360 degree turns lol any idea how to fix this? i'm on ue 5.3.2
This happen when the Car is not able to calculate the direction. Reasons can be:
1. The Spline is not on the same height as the car.
2. The Spline has a very sharp angle.
3. The car is at the end of the Spline.
it works now, thanks!@@Seredias.
Implemented - Thank you
Great tutorial!!Please,make a turorial about How to make cruise control foe car in Unreal Engine 4🤙🏼
Good Idea, this will not be easy, but I will give it a try.
@@Seredias. Thanks Bro!
Hi there @Seredias So everything worked until I placed "Path" blueprint on the world, and there is no spline points (spline points are visible in the Blueprint Editor). Any ideas how to fix that?
hi
in the end i can't find "Default> Active Path"
can you help me?
Blueprint Runtime Error: "Accessed None trying to read property ActivePath". Node: Return Node Graph: GetPath Function: Get Path Blueprint: carro-ai
Did you set the "Active Path" public (Open the Eye beside the Variable)? 4:07
@@Seredias. thank you! but now i have this:
Blueprint Runtime Error: "Accessed None trying to read property ActivePath". Node: Return Node Graph: GetPath Function: Get Path Blueprint: carro-ai
@@gaio5310 Did you place the "Path" inside the World and set the Active Path to this Path. 4:48
@@Seredias. Thank you!
@@Seredias. Heck even I'm getting the same error, along with no spline points 4:21 and no active path select option 4:48. "Active Path" is public!!
P.S. It's version 5.1.1
Hi!!!
2 questions
I went through some of your videos on this topic and I realised that you (as well as several UE5 tutorialists) did a lot of Car AI stuff without utilising the AI behaviour tree and Blackboard systems found in UE5.
I want to ask whether it was a creative choice or if there was a specific reason you used these methods over those.
Is there a specific reason for it?
Question 2
I tried with a first spline and it worked but steered too early before it got to the bend.
I then deleted it and made another spline but the car ignored it and drives in circles (the active path is always set) and it ignores every spline i make
Why is it doing this and can i fix it?
Yes, there is a reason for that. The Behaviour tree and Blackboard only works with an Charakter Blueprint, which has the Charakter Movement or Floating Movement. The Wheeled Vehicle Class can't use those AI Functions cause it's a complete different Blueprint Class with his own benefits like realistic Vehicle Movement.
Thanks for the tutorial, but I think you should explain a little bit, what are you actually doing and why, not just plant one node after another without any explanation of what it does. Especially for new users it would be much more helpful.
I know what you mean, but I can't satisfy everyone, cause on the other hand you have the avanced Users, who want it straight to the point. My focus is to find a good way for both. Me personally like it straight to the point as well. If I see a Tutorial with 30 Minutes and more, I don't wanna watch it. If I don't understand a Part of a Tutorial, I research it by myself.
@@Seredias. I don't mean to do indepth explaining of individual nodes, but you should at least to mention, why are you adding that 200 value to the vector (for instance). That would take like 5 seconds extra. Then add debug sphere on the position of the final vector and suddenly it would be much easier for everyone to understand, and it would only take an extra 30 seconds or so.
Ok, so this works great. But, if I spawn a car into the world, then give it the reference to the spline, and a Speed to start off at, it doesn't do anything. Any idea why?
Steps the recreate issue...
Set a Spawn Actor of Class (of type AI Car or whatever your vehicle is called) node on a Begin Play in another BP. Set the location to be at the start of the spline. Then set the Path Reference and Speed right after the Spawn node.
The car will spawn in, but it won't move. I've done Print Strings to make sure it has the correct Path reference and Speed. It does, but still refuses to budge. Any clues to what I'm missing?
Try Spawn AI from Class instead.
@@Seredias.Thanks for the response. No I figured it out... in the class settings, I had to change the 'Auto-Possess AI' option to 'Placed in World or Spawned'. Can't beleive this caught me out yet again! I've done this multiple times before.
Hey Seredias. So i wanted to copy this blueprint into various different type of vehicles.
And have the vehicles follow along 3 - 4 different paths like in your earlier traffic/change paths tutorial.
I think you had an integar which allowed for selecting different paths in details panel.
But this code doesn't give option/integer for multiple paths.
I am just wondering how i can have the option to change it's path to different splines?
If you want to switch the Spline, I can recommend this one: th-cam.com/video/H8b2p7L1j1c/w-d-xo.html
Hello, I'm on the same unreal version as the tutorial, however the "default" menu to select "Actor path" doesn't appear for me. Is there something I need to do to enable it? Followed every step verbatim.
Edit: Managed to find it by opening the property matrix however when I try to select "path" it doesn't confirm my selection, any way to fix this?
Did you create a Blueprint Actor called "Path"? 0:30 And is your "Active Path" an Object Reference to this Actor? 1:00
I had the same problem, but it showed up when I ticked the box "Instance Editable" within the AI_Car details-tab. (when editing the AI_Car Blueprint)
When I drive up to one of the AI cars and look at it for 3-5 seconds, it crashes into an invisible wall. But if I follow them, then everything works as it should. I can’t imagine why this is. Seredias, any help please🙏
Im tired ive done this 3 times flawless but when i try to make more than 1 path component for different cars of coarse only one ever shows up which is fucking stupid this is the dumbest engine ive ever used
What do you talking about, you just need to place multiply Path Actors inside the World and select them in the Details Window for different Cars. It's that simple.
Currently trying to make the same car made in this video spawn in and follow the path. I tried to follow one of your tutorials about car spawns but that was too complicated for the thing that I'm doing. Any advise?
The simplest way would be to create a Blueprint Actor "Spawn". Place the Actor where the Car should Spawn. On Begin Play use "Spawn AI from Class" and choose the AI Car.
My car keeps swerving side to side to stay on the path, it’s not really curvy but it still swerves.
Sounds like something is missing in the "Get Path " function.
@@Seredias. I'm having the same problem. I already double-checked my "Get Path" function and it is the same as the video. I feel like it maybe has to do with the turn handling in the car not being good enough to handle sharp turns, even at very low speeds, so it sort of swings wide and then overcorrects, resulting in a bit of swerving. Any advice on how to improve the handling?
@@emilyporterfieldart Well the swerving side to side definitely shouldn't happen. Since this Tutorial is 1 year ago, I double checked everything now and its still working without any problems. But you can improve the accuracy by reducing the tolerance (The float after the Normalize) or place an arrow component on the front of the Car and get the World Location of this Arrow instead of the Actors Location.
i cant get anything to follow splines i have folloewd every tutorial never has worked for me :(
@@hoshlyin1538 Then you missed something.
@@Seredias. always the case i guess
@@Seredias. Blueprint Runtime Error: "Accessed None trying to read property Activepath". Node: Return Node Graph: GetPath Function: Get Path Blueprint: VehicleAdvPawn
@@hoshlyin1538 See you didnt set the Active Path at 4:45
Hey sir, do you know a way to make a car AI chase the player until it stops or obstructs it? Just like the police cars in Need for Speed monster Wanted.
That's actually very complicated. I already make a Tutorial about it. Its not perfect, but describes the concept: th-cam.com/video/hX6NX-Vgqw0/w-d-xo.html
@@Seredias. In the inventory series, how many more chapters do you intend to make for the series?
@@devzonic288 There is actually no Specific Number, but I can say, many more. There are so many ways to extend it. Maybe it will go more to survival game.
@@Seredias. Nice sr
Hi @seredias i dont understand the logic in the part where you mention find tangent closest to world location and then normalize why is that required ?
This is just to optimise the calculation and make it more accurate.
NEED HELP ! lol everything works except the Wheels on the ai car they dont spin any thoughts on why this might be ?
@@TheTooTurntTahj I guess you use a custom Car? Did you have a Animation Blueprint for it?
@@Seredias. not a custom car! but that reply still helped me solve it. so, thank you!
the only thing I did different was add a skeletal mesh otherwise the Ai car don't show up ... but there was no animation Blueprint in Anim class, so I added the sportscar bp... sorry I'm new to unreal is this a proper fix? or is it going to give me issues and slow me down later? .. like when I want the cars to appear different .. or do I just copy and paste the ai car and change mesh and Anim blueprint?
@@TheTooTurntTahj If you're using Version 5.4 of the Unreal Engine, you need to copy the VehicleAdvPawn, which is the parent class. Its not possible to just change the skeleton mesh, since many content Packs have there own structure like different bone names etc. So to get different Vehicles you can use Content Packs like this here: www.unrealengine.com/marketplace/en-US/product/9a705589d1994c6e8757fdbedaf698af or make a custome Car: th-cam.com/video/Z_BgNXtHQww/w-d-xo.htmlsi=LhJpQYpFOUPDXZ_8
This tutorial is great! I am encountering a very strange issue though, and for the life of me I cannot find what the error can be. I followed this tutorial twice for two separate projects, and the first one I had no issues. The second one, however, while the AI follows the path and steers beautifully, for some reason the car will just abruptly stop out of nowhere at random, and then proceed again a few seconds later.
The AI blueprints are, minus some variable names, are identical between the two projects, and I confirmed my vehicle's settings are the same as what you have in the video (automatic transition, etc). So I'm at a bit of a loss as to what could possibly be causing the car to suddenly stop out of nowhere. I would've just reused the first project since it's working there, but it's a situation where while they both use vehicles, the games being made are so drastically different that it was easier to start from scratch than to copy the project and strip out the unnecessary parts. Tracking their variables with some debug commands and whatnot, the steering and throttle are appropriate being applied to the AI cars too. Like the throttle doesn't just become zero out of nowhere for example, even when they stop.
Is this an issue you've encountered before, and if so, do you happen to have an idea of what the error could be?
Since the function is just calculate the Steering, this can't be the Problem. Are the Cars the same in both Projects? My first guess was, that something in the World block the Car (Invisible Collision), but since it's continue driving after a few seconds, it's sounds more like strange configuration of the engine.
@@Seredias. So I'm not 100% sure about this, but I think what's happening is that they're stopping whenever they're off-camera. If that is what's causing it, it's definitely not consistent, it's just the most consistent repro I've got for the bug. I'm not sure what setting could possibly affect that though.
any solution please tell me (Invisible Collision@@Seredias.
@@freedomhindi4949 As I said this Problem come from something else. I would recommend to try this inside a complete new Project (Vehicle Template) with the default Sport Car.
sir i check new project but problem still but when i change car mesh collision car not stop @@Seredias.
My car follows the path but it drives in serpentine lines
The calculation of the Car is going from the Pivot Point. Do you use default Car or a costume one?
i use the default car from ue5.4
@@TheLion0815 Then I am not sure what you mean by serpentine lines.
@@Seredias. I cant good Englisch i maked this with google tranelator i mean Back and forth
i think its happening because its trying to stay on the spline line and it is over correcting to the other side and thats causing the serpentine line im having the same thing
Great!
HELP!!
It keeps stopping while running. (If you stop, the wheel doesn't rotate and goes forward.) If you stop again and start, it stops again as if it's under constraints.
How can I solve it?
Did you use the Default Sports Car? And did remove everything else from the Event Graph first?
thanks you help me alot!
nice!
Path Object type doesn't seem to exist in 5.3, any ideas what it might have been replaced by? Cheers!
It does, but of course you need to create it first 0:28 "Path" is just the name of the Blueprint Actor.
@@Seredias. ahhh! Awesome thank you!!
it's not taking a turn it is just going straight thereby not following the path. any idea why?
Then you missed something in the Get Path function or didn't assign the Path. 4:45
Hey Seredias, thank you for the great sharing , is this able to work in sequencer ?
Yes, like this: th-cam.com/video/QJxtca_s8RU/w-d-xo.html&feature=share7
@@Seredias. thanks seredias ,let me try this. have a good day cheers
@@Seredias. not really bro , basically using your Ai spline ,record in sequencer , but i manage to make it in triggle custom event take , just dont sure how to fix the handling of the car when the speed go faster , the turning didnt follow the path well. Do you have any advice for making the car turn closes to the path ?
@@spvs8914 Of course when you drive to fast into a turn, the physic of the Car will push it outside the Spline. So basically you need to slow down in corners. You can trigger that inside the scene for example.
@@Seredias. i still have to study more on blue print , just started few month ago , thanks for knowledge sharing
Thank you for your nice Tutorials, I am since 1998 3d Artist in the automotive industry and since last year I try to learn unreal 5 after some years experience with unity. The blueprint thing seems to be very innovative, but in the beginning it's hard for me to understand this programmer logics. Your Tutorial is good, it runs exactly like your example now. So my question is, when I duplicate path and Ai car in the world brower, go get a second car that drive as on coming traffic in reverse direction. How can I do this, my second car everytime turns around on the second spline and drives in the same direction of the first car.
You need to rotate the Spline inside the World as well. A Spline has a direction with the Car follow.
@@Seredias. Thank you, again, but it doesn't work, I try to make your tutorial step by step again next time, maybe some parameters are buggy in my scene. By the way, what do you this about the plugin "Rush Hour" for UE5,
@@Seredias. ...OK now it seems to run. Find Tangent Closest to World Lacotion, the coordinator space I set to Local not to world... my bad.
seredis,sorry to border you again , i sue the sport car it works , but when i change to custom car , the rig and everything fine in the game mode, once i apply the step ,the car just stop and not moving at all in the simultiaon , any clue ? ? sorry to border
It will only work on play, cause it gets triggered by Begin Play.
is ok , found the problem , is the mass of the car too heavy causes the 0.5 throttle value not enough to accelerate .... lol , i can the mass or throtter higher it works
The Default category that has active path isn't in my details 1 menu? Has this changed for Unreal 5.1? Thanks!
Did you make the "Active Path " public? 4:07
What changes would i have to make to the stearing input to get the car to go backwards as it drives along the spline?
The Steering Input will work for reverse as well, but instead of the Throttle Input you need to set the Brake Input to 1.
Unfortunately no. the steering input will always attempt to face the front of the car in the same direction as the spline, meaning that if you have it going in reverse it will turn the opposite direction at turn points and then go that way forever. @@Seredias.
Well of course I tested that before and it works as expected. Like in the Tutorial I placed an Path inside the World, placed the AI Car at the Begin (the Direction of the Spline is very important as well), turn around the AI Car and set the Brake Input instead of the Throttle Input.
I really like this video but I have a problem. I want to scale the car down to .05 but the problem is that when i run the program, the car flies above the ground. I can't seem to keep the car on the ground. it takes off and flies along the path of the spline. Help
This should help: th-cam.com/video/rH_0PLMGmJw/w-d-xo.html
Thank you!
Hey there. I seem to have the same issue as a few others. I followed your tutorial exactly, and the car does not follow the spline. Just drives forward no steering. I am using one of the vehicles from the free market place selection (VehicleVarietyPack). And also I have indeed set the default to Path @4.44. Any ideas? Thanks alot for your tutorials btw!
If the Car don't follow the Path, the could only be two reasons. The Get Path function have to be called and the Set Steering Input has to connected 4:04.
And as you said right, the Path has to be set for the Active Path Variable.
@@Seredias. Thank you for your quick reply!! It was actually neither. I unticked enable tick on start! So that was the issue. I always worry about using the tick function. Working now, thank you very much! Would there be an alternative to update the steering instead of event tick do you think?
@@Emblanefilms If you dont want to use the Tick Event, you can build a loop with a Delay as well.
Seredias replied two months ago
I'm checking and using it, too
---- Did you make the "Active Path " public? 4:07 -----
My car has gone heywire. I dont know what it is following, but it is certainly not the spline. Need Help
Does it drive just straight or random? Did you set the Active Path for the Car? 4:44
@@Seredias. I have the same problem.i think it drive random and I already set the path as shown in 4:44
@@劉品萱-k2w Since this function only calculates the steering, the problem can only lie within the Get Path function. So I would check this out.
Hey! Is there anyway I can make the sportscar work in a custom map? I tried assigning it to player 0 but nothing happens when i try to play. Ue 5.1
Of course, you just need the Vehicle Template. Than go to Project Settings -> Maps and Modes and choose the Vehicle Template. The Auto assagin is more for testing. You can use a Player Start as well.
Doesn't work in 5.4.4. Vehicle is using some sort of parent module, where actual inputs and things are
Yes, just do the configuration on the Parent instead of the Sports Car.
nice one, be nice to know how to make it so the ai knows how to brake before hitting corners
In this Case I would recommend this one: th-cam.com/video/rH_0PLMGmJw/w-d-xo.htmlsi=b_hhaBzQWAlz70T1&t=250
At the 4:10 you can find what you need. It still works for UE5.
I followed everythink as close as I could but the car is not following the spline. I am really stuck here. Can this happen because of anything specific?
If the "Get Path" function is fine, it should work. Did you set the Path for the AI? 4:44
@@Seredias. I did. Still it is not following the spline. :)
@@ArtsyAishik So it drive forward, but won't steer at all, right?
@@Seredias. yes exactly.
@@ArtsyAishik If you want, you can join the Discord Server, so the community can help to fix that.
Thanks!!!
Hi..Thank u For the Tutorial
How Can I Stop The Car when the spline Point Ends
With a Collision Box at the end of the Spline. "On Component Begin Overlap" you need to set the Throttle Input to 0 and the Handbrake Input to true.
What is the reason why this method does not work for vehicles that are not equipped with UE5 and can drive car resources....
What do you mean with "not equipped"? If you mean, that you want to drive any Vehicle resource in the World, you need to convert it first: th-cam.com/video/TItjnI4A0io/w-d-xo.html
single car not problem but multi car problem automatic stop if any solution please tell me sir
Did you copy the Spline inside the World or in the Content Browser? Since this function only calculate the Steering, the Problem came from something else.
Hi bro. thank you for video.I have Question I done every thing seam this video but my car going revers. can you help me please how can I do for solve that?
Do you mean it follow the Spline but drive in the wrong direction or does it drive backwards.
@@Seredias. No Sir it's not follow the Spiline.
@@UniversKnowledge-1 So it's just driving backwards? Did you set the Throttle Input to a minus value? 3:50
@@Seredias. yes Bro I check that also😒
But I creat AI car BP by myself.because I wanted use my Car Model
Thanks
Can I create animations with this? Like for a short film
Kind of. Maybe like this: th-cam.com/video/QJxtca_s8RU/w-d-xo.html
Does this work on 5.4?
@@Cpbetayt Of course, why not?
@@Seredias. thanks🥰
Dear Seredias
Do you know how can we get speed or acceleration of car during the game and save it every one second and then export it?
In other words how we can get vehicle data and save it in data table
I wish you had a video fir that
Interesting question. Unfortunately there are only 2 ways to combine external Data with the Unreal Engine. First you could write a custom c++ function that can handle csv for example. Or there are many code plugins to convert files. For both solutions exist many Tutorials. Since I don't have much experience with them, I cant recommend a specific one.
Finally made the move to UE5? Is it permanent?
Not now, since the UE5 still has to many Bugs and is not compatible with most of the Content Packs. The Update Tutorial should answer all questions that came up since the Original Tutorial was released. Also nearly all of my UE4 Tutorials are compatible with UE5.
is there a way to set the active path through blueprints ?
Sure, I would recommand this way:
th-cam.com/video/H8b2p7L1j1c/w-d-xo.html
Very nice tutorial. if I would for example duplicate your car and want to have both driving at the same time, and following different splines, could I just duplicate the spline actor and draw a different spline for that and point the second car to it? Because I tried and it doesn't work. Duplicating the AI_Car works fine. Just call it AI_Car_2 and it has all the set up work done in the Event Graph etc. But duplicating the Path actor didn't work. The AI_Car will follow Path no problems. But AI_Car_2 will not follow Path_2. What needs to be done? make the Path actor from scratch instead of duplicating? Because everything else is the same. if the solution is making the path actor again from scratch, why is that needed? Thanks!
I guess you duplicated the Path inside the Content Browser. There is the Problem. The AI Car has a reference Object called "Path". So to create a second Path, just place "Path" object again inside the World and set it inside the Details of the second car.
@@Seredias. You mean if I duplicate it inside the world instead of inside the content browser it would work? Sorry, I'm not sure I understand you.
@@ltvddvtl Yes, cause inside the World its a Copy and inside the Content Browser its a new Object.
@@Seredias. I see. But it being a copy, could I still change the direction of the path/spline and it would work independently from the original? Like having multiple copies with different splines.
@@ltvddvtl Yes, of course.
How to make the car follow the same path in loop like on a race track
Just connect the end of the Spline with the start.
@@Seredias. I tried that but the car starts following the end of the spline and starts going in the opposite direction
@@sidharthkothari9282 The start and the end need to a little bit away from each other, about 1 - 2 meter.
the vehicle just goes straight does not turn. I am using chaos vehicle component as my vehicle is a tank.
Than something inside the "Get Path" is missing.
@@Seredias. I copied it exactly. I even repeated it twice just to be sure.
@@djtc2093 Does it just drive forward, without steering? Did you set the Active Path in the Details. 4:44
@@Seredias. Yes, did everything you said. It's a tank with 16 wheels. Uses arcade settings for yaw torque.Only drives straight. and does not stop
@@djtc2093 I think the amount of Wheels could be the Problem. Did you test this with a 4 Wheel Vehicle? Can you steer the Vehicle in generell?
Can it stop and/or drive around obstacles in path GTA style?
Sure, you just need to "draw" the Spline where it should steering.
The Car is driving in circles
Than you missed something inside the Get Path function, because your Steering is 1.0 or -1.0
@@Seredias. Thank you, I missed the settings for the steering
how can I make the car to stop
By setting the Throttle Input to 0 and the Handbrake Input to true.
How to set neutral gear position or clutch in unreal engine (Neutral such that the car will roll when in an inclined position) Thank you in Advance.
You need to uncheck the "Automatic Transmission" under the Vehicle Movement, than get the Vehicle Movement inside the Event Graph and use the "Set Target Gear" Function to change the Gear to 0 (Neutral). I also have a Tutorial to explain it: th-cam.com/video/5Cam9_dIEP0/w-d-xo.html
Thank you for replying but i already did that but the car would not roll down a steep inclined and also can you give any tip for creating a clutch system in unreal engine Vehicle
i dont understand all think is perfect but ai car automatic stop few second later when we see car they automatic start when see ai car
So it follows the Path but stops randomly? Does it stop always on the same position?
no , only when camera no see ai then car stop car and when i see car ai car autonatic start@@Seredias.
@@freedomhindi4949 How you managed that? That's very strange. I recommend to try the AI Car in a complete new Level.
ok sir@@Seredias.
sir i track ai car stop problem because when i check multi ai car 3 or 5 car add path they automatic stop
Can you please make car damage tutorial?
I would like to, but there is not implemented way inside the UE4 to do that. But with UE5 they integrated it from the Engine itself. I try to figure out how they done it, but its complicated.
tell me how to get points for overtaking a car how it is implemented in traffic racer pls)
Already did a Tutorial for this: th-cam.com/video/I4suPcwRB_I/w-d-xo.html
@@Seredias. I'm talking about a player who will receive points for overtaking cars, as implemented in traffic racer
Oh, also have a Tutorial for that: th-cam.com/video/CzgOnZtgxQQ/w-d-xo.html
But I would recommend to watch the other Parts as well.
@@Seredias. ok how do i make a scoring system then
You can use the "Calculate Distance" Function for this and check if the Position is lower than before. If that happen you can gave the Player some points.
Sir also want a tutorial on police car chasing please help
Already did: th-cam.com/video/hX6NX-Vgqw0/w-d-xo.html
make sure u thumbs up! we need good coders on youtube.
bro my car rotates in its own place plzzz help
The Car does that when it can't calculate the Steering. Is the Path on the same height like the Car? Does the Car do that on Start or just at the end?
@@Seredias. It does that at the start and keeps on looping like that
😢😢
@@djkitchen6508 As I said, the Path needs to be placed at the same hight as the Car.
@@Seredias. My road is a bit higher and some place lower is that the issue, if it is how do i fix it
gotta love when my ai car is redlining
Use Full Vedio
traffic master
Can u do how to stop ai car?
Already did: th-cam.com/video/rH_0PLMGmJw/w-d-xo.html
@Seredias I really needed this! I have an issue though, I need the car/s to go much, much faster when I do so there they an issue going in a straight line and also sticking to the path is there a fix for this you can suggest? > th-cam.com/video/Kwjf7M26eOk/w-d-xo.html also; when I try to simulate instead of pressing play, the Ai car doesn't move do you know why and is there a fix for that also please?
What did you change to make it faster?
The answer why it doesn't move when your simulate is simple. It runs on the "Event Begin Play".
PS: Could you give me a favor and remove the link from the Comment. TH-cam itself usually block links in the Comments.
Thanks
Thanks!