Unreal Engine AI Car Tutorial: Traffic Spawn

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

ความคิดเห็น • 45

  • @Seredias.
    @Seredias.  ปีที่แล้ว +2

    Here is bug fix for the Spawn Function 4:40: Delete the Cast and instead "Get Player Pawn" -> "Get Actor Location".
    As well you need to replace the Cast at 7:10 with "Get Player Pawn" and compare it (equal) with the "Other Actor".

  • @HELLOEDDISON
    @HELLOEDDISON 2 ปีที่แล้ว +2

    Literally the best unreal engine tutorial maker ever on the platform! Keep up the great work!

  • @pavelprykhodko743
    @pavelprykhodko743 2 ปีที่แล้ว +1

    It's amazing, it's exactly what I'm looking for. Thanks Man

  • @sorinanghel6119
    @sorinanghel6119 ปีที่แล้ว +1

    Thanks a lot for the videos! They're great! I had some issues with this one. In my case I only had a two ways road and using InRange(integer) was turning me crazy because I was using them as if i had more than one lane on each side of the road. Finally got it to work but it only works with the player character. In my project you can also drive a car not only play as the 3rd person character, and for some reason everyyime I use a car it spawns like 3 cars at the same time and they collide and fly away. Any ideas? I've tried many changes in the script but nothing seems to work.

    • @Seredias.
      @Seredias.  ปีที่แล้ว

      Yeah I know, sorry for that. So the Problem is inside the Spawn Function 4:40. To fix this you can delete the Cast and instead "Get Player Pawn" -> "Get Actor Location".

  • @Xegethra
    @Xegethra 8 หลายเดือนก่อน

    I can't get the cars to spawn from this. My project is a little different and I had to try to accommodate for that. I don't use a player character, the players will be controlling cars and cars only so I used get player pawn where you used get player character. Also since my game doesn't use the ability to get on and out of a car, my AI cars don't have the IsAI function. They are like the first cars from your older videos and so I can't put in IsAI at 06:17.
    I have been on that tutorial to create it, but is there a way to make it without creating a function to get in and out of the car or an input checking if it's AI? Do I really need the IsAI at all? My cars follow the roads perfectly fine when I place them in the world. They just don't seem to spawn with the spawner here.

    • @Seredias.
      @Seredias.  8 หลายเดือนก่อน

      The IsAI Boolean is not necessary for this Tutorial. The "GetPath" Function is all you need, to get the Cars to follow the Road. And yes, its recommended to use "Get Player Pawn". Did you delete the Cast as well?

    • @Xegethra
      @Xegethra 8 หลายเดือนก่อน

      @@Seredias. I did, and I tried it where I didn't. Tried all sorts of combinations and I get nothing spawning. I must have done something wrong but I can't see what. It looks the same to me as your video.

    • @Seredias.
      @Seredias.  8 หลายเดือนก่อน

      @@Xegethra I would debug one Street Part to see where the function is going and where it takes a wrong turn.

    • @Xegethra
      @Xegethra 8 หลายเดือนก่อน

      @@Seredias. Well, it seems the Spawn Radius isn't seeing when I pass through it. There's no reaction from it.

  • @niklas8304
    @niklas8304 6 หลายเดือนก่อน

    Very helpful car tutorials!!
    But ive got a question, Is there a way to combine this with the default road spline from the ue5 car template?
    or would i have to make my own road generator bp, like your other tutorial, and do the landscape after i created my road?

    • @Seredias.
      @Seredias.  6 หลายเดือนก่อน +1

      @@niklas8304 Unfortunately it doesn't work with Landscape Spline, cause you cant get a Reference to it. But it should work with any Blueprint Actor.

  • @CelenaEspinoza
    @CelenaEspinoza 6 หลายเดือนก่อน

    Hey for my project I need the traffic simulation to be looped in a circle. Can you give some suggestions or help?

    • @Seredias.
      @Seredias.  6 หลายเดือนก่อน

      @@CelenaEspinoza Same concept, just another Street Part.

  • @pavelprykhodko743
    @pavelprykhodko743 2 ปีที่แล้ว

    Hi Man. about "SET AI" 6:14 tell me pls where is this tutotial ?

    • @Seredias.
      @Seredias.  2 ปีที่แล้ว +1

      Sorry I forgot to link that. So here it is: th-cam.com/video/z_3Wrm4AOA4/w-d-xo.html

    • @pavelprykhodko743
      @pavelprykhodko743 2 ปีที่แล้ว

      @@Seredias.are you sure this is a right tutorial? because i beed to added a lot of function that dont needed to the project. or i need to added "IS AI" variable?

    • @Seredias.
      @Seredias.  2 ปีที่แล้ว

      @@pavelprykhodko743 You basically just need the IsAI Boolean and the "Start AI" function at Begin Play.

    • @pavelprykhodko743
      @pavelprykhodko743 2 ปีที่แล้ว

      @@Seredias. thanks

  • @DBK_Spikes
    @DBK_Spikes 6 หลายเดือนก่อน

    Hello thanks for the tutorials.
    Please can you teach us how to create different multiple NPCs cars.
    Thanks

    • @Seredias.
      @Seredias.  6 หลายเดือนก่อน

      @@DBK_Spikes Like I explained at the Begin, you just need to create one NPC Car as a Parent Class, then Child Classes from it with different Skeleton Meshes. If you want to know how to create your own: th-cam.com/video/Z_BgNXtHQww/w-d-xo.htmlsi=Z3kwPdy5_fQqX11o

  • @LanD_87
    @LanD_87 ปีที่แล้ว

    do you have an idea of ​​what could be called the function vector - vector that you call around 5.16min in version 5.0.3 I can write vector less vector or vector - vector or vector < vector nothing comes out of me

    • @Seredias.
      @Seredias.  ปีที่แล้ว +1

      "Subtract", they changed the Math-Functions in UE5.

    • @LanD_87
      @LanD_87 ปีที่แล้ว

      @@Seredias. thanks friend I went back to the first video season 1 for the cars apparently essential to start from the beginning hahaha

    • @LanD_87
      @LanD_87 ปีที่แล้ว

      @@Seredias.
      I have the same problem here I don't know what the vector function is called * vector I have the multiply from after but not the vector you put do you know the name on version 5 please? on the saison 1 video at 5.35 min please

    • @Seredias.
      @Seredias.  ปีที่แล้ว +1

      @@LanD_87 If you're using UE5 I would recommend the first Tutorial of Season 2. That should help. I would also recommend to use 5.1.1, cause 5.0 has to many bugs.

    • @LanD_87
      @LanD_87 ปีที่แล้ว

      @@Seredias.
      Thanks a lot .
      I will try on 5.0 because I have done all my features on my character life endurance hunger etc on 5.0 it will annoy me to have to redo everything but if it bugs too much I would do everything again thank you friend for your answer

  • @SmasherZ_
    @SmasherZ_ 10 หลายเดือนก่อน

    Can this work with the endless road?

    • @Seredias.
      @Seredias.  10 หลายเดือนก่อน

      Yes, it does.

  • @vishalvallamkonda6926
    @vishalvallamkonda6926 ปีที่แล้ว

    I found the video to be extremely helpful for my project, and I greatly appreciate the effort that went into creating it. I would also like to request the project file, if possible, as it would be very useful for my own work. Thank you in advance for your help.

    • @Seredias.
      @Seredias.  ปีที่แล้ว

      I cant share Project Files, the reasons are:
      1. I often use Content Packs from the Marketplace, to make it more visual what I mean. Since I didn't create them, I'm not allowed to share them. Of course I always link all Content Packs I used in the Description.
      2. I don't backup the Projects, so most of them don't exist anymore or contain many other things.
      3. "Learning by doing" is always the best way in my Opinion. That's why I create these tutorials.

  • @bananaface1445
    @bananaface1445 2 ปีที่แล้ว

    Great Video but I have encountered a problem that every time a car spawns in there is a bit of lag. Any ideas how to fix this issue?

    • @Seredias.
      @Seredias.  2 ปีที่แล้ว

      Sounds like a Performance issue. Depends on how many Cars you Spawn and how detailed they are.

    • @bananaface1445
      @bananaface1445 2 ปีที่แล้ว

      @@Seredias. I used the city Sample vehicles in unreal engine 5. I made the lag somewhat go away by lowering despawn and spawn distance so less cars in total will spawn. Thanks for the great and helpful videos and for the quick response as well.

    • @vishalvallamkonda6926
      @vishalvallamkonda6926 ปีที่แล้ว

      @Banana face I am facing a problem with spawning cars. I would also like to request the project file, if possible, as it would be very useful for my own work.

  • @munuberaoficial64
    @munuberaoficial64 2 ปีที่แล้ว

    make a tutorial on how to put sound in vehicles

    • @Seredias.
      @Seredias.  2 ปีที่แล้ว

      Already did: th-cam.com/video/MM605R4XEsA/w-d-xo.html

  • @MrEelement
    @MrEelement ปีที่แล้ว

    Would this work in ue5.2?

    • @Seredias.
      @Seredias.  ปีที่แล้ว +3

      I don't see why it shouldn't.

  • @munuberaoficial64
    @munuberaoficial64 2 ปีที่แล้ว

    our very good thanks

  • @Moaedmsawer
    @Moaedmsawer 2 ปีที่แล้ว

    is't work with android ?

    • @Seredias.
      @Seredias.  2 ปีที่แล้ว

      In theory, yes. But maybe you get Performance Problems, cause of the performance of the Smartphone.

  • @DREAMSJPEG
    @DREAMSJPEG 9 หลายเดือนก่อน

    How would you approach programming in merging lanes and making the AI vehicles determine the best lane for them to be in?

    • @Seredias.
      @Seredias.  9 หลายเดือนก่อน

      Lets say we have two lanes that merging into one. In this Case the Vehicles needs to fit on one lane without hitting each other. You can realize this with the Traffic System from this Tutorial Series: th-cam.com/video/nMw6FQ2c34U/w-d-xo.htmlsi=CMl94Z1UglhA0-Ze
      To make the Vehicles change the lane, you create a Collision box in this specific Road part to set the Active Path to the other lane.

    • @DREAMSJPEG
      @DREAMSJPEG 9 หลายเดือนก่อน

      @@Seredias. Thanks :) Any pointers for making the ue5 vehicles less arcade and bouncy?