Announcement

Collapse
No announcement yet.

Vehicle Navigation Examples

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

    Vehicle Navigation Examples

    Hello,


    I am posting a link to a project I have made over the last few days. There are three maps with basic blueprints that allow you to set path navigation input to your vehicles.
    They are pretty rough but hopefully gets you in the neighborhood of setting up your AI using vehicle physics. The spline based example is a "reset to track function" away from being passable , for arcade AI. Only one uses Navdata , which is simply programmed to find a path to a random location, the other two use predetermined paths set by you. I started making these examples when I saw a post from someone asking how to setup their vehicle AI for a matinee scene. These examples should allow you to set simple A to B or advanced track paths. The biggest issue seems to be the car slipping in turns which makes the car loop around its goal location for awhile. I tried to keep the AI moving as close to top speed as possible, more adjustments to the vehicle movement settings should help with slipping, slow speeds handle very well. There is also a small flying AI example that could be satisfactory if you find a nice rotation interp setting.


    Made in 4.7.5

    Download zip

    https://github.com/Uniname/SplineVehiclePath


    https://www.mediafire.com/?1j2vraas8ypfrrb



    Click image for larger version

Name:	TrackFollow.png
Views:	1
Size:	422.8 KB
ID:	1148242

    Click image for larger version

Name:	VehicleSplineFollow.png
Views:	1
Size:	797.7 KB
ID:	1148243

    Update to first map here

    https://github.com/Uniname/MapUpdate
    Attached Files
    Last edited by Uniname77; 04-19-2015, 08:18 PM.

    #2
    This is cool! If you check out my examples, I'm sure it will give you some ideas to expand on. I'll definitely take a look at this.

    Comment


      #3
      Thanks! I should have taken a look at your examples before I started. I think I remember one of you videos showing simple avoidance, which would be an awesome feature to use with this.

      Comment


        #4
        Thanks, yes I've tried a few things here and there. I like that you created more arcade AI for tracks, I created something similar with dune buggies example. I'm going to try creating something new with the current examples more along the lines of arcade driving AI.

        I remember the days of need for speed hot pursuit haha!

        Comment


          #5
          Updated the link with a file containing the maps shown in the first two photos. File size is now 94MB < 1.2GB (111 MB in git)
          Apologies if I wasted your bandwidth.
          Last edited by Uniname77; 04-17-2015, 08:05 PM.

          Comment


            #6
            thank you

            Comment


              #7
              This is really great. I was able to get my own mesh in there and it drives, but it wobbles left and right pretty ferociously on the curves. Any idea why this might be? It's almost like the path has become a zig-zag, but I'm really just learning UE so it could be something simple. Thanks for your work!

              Comment


                #8
                I guess that's because of the small gap he gave the AI. It will only steer if current rotation and the needed one is less then 5 units away from each other.

                @OP: Thanks for sharing this. It helped me getting started on a small test project. Although i completely dropped the spline and made my own node system.
                Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

                My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
                (Including 100+ Pages Multiplayer Network Compendium to get you started.)

                Comment


                  #9
                  You're welcome everyone,

                  Yes, what eXi said about the gap is probably the reason it would wobble (if you turn it up higher it will get worse), but I have only noticed that when it is going straight.
                  While turning a curve it spins out a lot, so I would look to adjusting the cars handling features to limit the slipping going through turns.

                  I have updated the first map pictured. You can now select what paths to connect in the back and front, also specify the beginning path by giving it the tag "first". The paths work on interfaces now, so you can add your own paths by implementing the "return" interface. Every path now can receive input suggestions that you can toggle from the "basesedan" blueprint. You can reverse it now, setting the variable in the Game Mode to true, note that it is not very useful if you have set input suggestions for your points. Every car in the map is not running on the update, if you notice input suggestions being ignored that would be the reason.

                  https://github.com/Uniname/MapUpdate
                  Last edited by Uniname77; 04-20-2015, 11:26 AM.

                  Comment


                    #10
                    Originally posted by Uniname77 View Post
                    Updated the link with a file containing the maps shown in the first two photos. File size is now 94MB < 1.2GB (111 MB in git)
                    Apologies if I wasted your bandwidth.
                    Hi Uniname77;
                    So; no need to keep the old project [VehiclePathMaking.zip] with 1.3GB downloaded from the first post before updating...!!? OK;

                    Since I'm not familiar with GitHub; can you please show me the way how to grab the project at there...?

                    Many thanks for sharing your work
                    Best Regards
                    Forgive me; for poor English language

                    Comment


                      #11
                      You don't need to create an account, just click on the link and hit the download zip button.

                      Click image for larger version

Name:	GitDownload.png
Views:	1
Size:	36.2 KB
ID:	1074869

                      Unzip and copy the project folder you see with the .gitattributes file into your Unreal projects folder.

                      Click image for larger version

Name:	Gitdownload2.png
Views:	1
Size:	6.4 KB
ID:	1074870

                      Comment


                        #12
                        Originally posted by Uniname77 View Post
                        Unzip and copy the project folder you see with the .gitattributes file into your Unreal projects folder.

                        [ATTACH=CONFIG]35945[/ATTACH]
                        Thanks for the detailed instructions.
                        I may guess they should be copied in the Content folder... Right?
                        Forgive me; for poor English language

                        Comment


                          #13
                          No, it should dropped in the Unreal Projects folder which should be in your Documents folder.
                          It should be accessible from the launcher library once it is in the folder.
                          When migrating the content from "Map1Update" to your project, it should be placed in the Content folder.
                          Last edited by Uniname77; 04-21-2015, 05:23 PM.

                          Comment


                            #14
                            any chance of a video tutorial on how this was done? I could use something like this for the AI project i am working on.

                            Comment


                              #15
                              I tried using only one spline path just to move the sedan vehicle along it...
                              The result was fine except I do not know how to make the vehicle to stop at the end of the path..!!
                              I'm looking for the solution for this issue, cause I'm working on creating a video (using matinee) for an Archviz project (used in Architectural Presentation), the video containing an animated vehicle between to points...
                              Forgive me; for poor English language

                              Comment

                              Working...
                              X