Announcement

Collapse
No announcement yet.

DoN's 3D-Pathfinding / Flying-AI system (with full source!)

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

    Hello. For those who are digging this topic, I had some experiments not so long ago, here are my video with all relevant links (including sample project) in description:
    https://www.youtube.com/watch?v=jnrZBlBkkq8
    Disclaimer: I am using commercial "SixDOF" flying component for ship movement.

    Comment


      We need a functions like:
      AbortDynamicCollisionUpdateTask()
      RemoveDynamicCollisionObject()

      Now the only way remove a dynamic object is to move to the edge of the map.

      Comment


        hey !

        your plugin is awesome but, almost every time i launch the game I got this crash error:
        (i'm using the blackboard way)


        Fatal error!

        Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00007098

        0x000000001987CAEF UE4Editor-DonAINavigation.dll!TSet<AActor * __ptr64,DefaultKeyFuncs<AActor * __ptr64,0>,FDefaultSetAllocator>::FindId() [d:\rocketsync\4.19.0-3944462+++ue4+release-4.19\working\engine\source\runtime\core\public\containers\set.h:623]
        0x00000000198905A9 UE4Editor-DonAINavigation.dll!UBTTask_FlyTo::SchedulePathfindingRequest() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\donainavigation\source\donainavigation\private\behaviortree\bttask_flyto.cpp:92]
        0x000000001987C0DC UE4Editor-DonAINavigation.dll!UBTTask_FlyTo::ExecuteTask() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\donainavigation\source\donainavigation\private\behaviortree\bttask_flyto.cpp:58]
        0x00000000280D8EED UE4Editor-AIModule.dll!UnknownFunction []
        0x00000000280F668F UE4Editor-AIModule.dll!UnknownFunction []
        0x000000002810F600 UE4Editor-AIModule.dll!UnknownFunction []
        0x000000002ADFD628 UE4Editor-Engine.dll!UnknownFunction []
        0x000000002AE30184 UE4Editor-Engine.dll!UnknownFunction []
        0x000000002BB0690B UE4Editor-Engine.dll!UnknownFunction []
        0x000000002BB0BFE3 UE4Editor-Engine.dll!UnknownFunction []
        0x000000002DB0B713 UE4Editor-Core.dll!UnknownFunction []
        0x000000002DB0BA50 UE4Editor-Core.dll!UnknownFunction []
        0x000000002BB2CD35 UE4Editor-Engine.dll!UnknownFunction []
        0x000000002BB32AE2 UE4Editor-Engine.dll!UnknownFunction []
        0x000000002B38BF04 UE4Editor-Engine.dll!UnknownFunction []
        0x000000002B397429 UE4Editor-Engine.dll!UnknownFunction []
        0x0000000028FFD781 UE4Editor-UnrealEd.dll!UnknownFunction []
        0x0000000029899516 UE4Editor-UnrealEd.dll!UnknownFunction []
        0x00000000A1D55EAC UE4Editor.exe!UnknownFunction []
        0x00000000A1D66BD0 UE4Editor.exe!UnknownFunction []
        0x00000000A1D66C4A UE4Editor.exe!UnknownFunction []
        0x00000000A1D74149 UE4Editor.exe!UnknownFunction []
        0x00000000A1D75B57 UE4Editor.exe!UnknownFunction []
        0x000000007E011FE4 KERNEL32.DLL!UnknownFunction []
        0x000000008066F061 ntdll.dll!UnknownFunction []
        0x000000008066F061 ntdll.dll!UnknownFunction []



        Could somebody help me undersand what's not working ?
        Maybe it is a bug ?

        Have a nice day !

        Comment


          Hi there,

          I'm relatively new to game dev, and I have what I hope is a quick question,

          Does the "Fly To" blackboard task guide an actor along the "Data Path Solution Optimized?" vector array returned by the result handler delegate?

          I ask because I'm working over someone else's code, and in order to have an actor guide the player to an objective, they used "Fly to" on each subsequent vector in the optimized data path.

          This causes the actor to pause at each vector, and check if the player is with them. With a small voxel size, this movement looks rather strange and stilted.

          I was wondering if it might be easier (and more aesthetically pleasing) to instead impose a short time limit on the Fly To task, and use the final objective as the Flight Location Key.

          The idea being that actor would move as far as it could in the time allotted, then check for the player before moving again.

          Thoughts?

          Comment


            VSZ Hi, the plugin is amazing but I'm worried about performance. My level is 32km*32km and I'm using world composition (level streaming) so it has 64x64 tiles. I Think Infinite Navigation might be extremely costly on my map. So I need something like Navigation invoker component (A component that generate navigation around pawn/character dynamically). Do you have any plans for something like that? Or any suggestion to achieve my goal with low frame time cost?

            Comment


              I was trying to convert this into a more specific flocking algorithm instead of individual paths for everything, but have no luck so far
              | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

              Comment


                For anyone who encounter this error.
                Fatal error!

                Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00007098

                0x000000001987CAEF UE4Editor-DonAINavigation.dll!TSet<AActor * __ptr64,DefaultKeyFuncs<AActor * __ptr64,0>,FDefaultSetAllocator>::FindId() [d:\rocketsync\4.19.0-3944462+++ue4+release-4.19\working\engine\source\runtime\core\public\containers\set.h:623]
                0x00000000198905A9 UE4Editor-DonAINavigation.dll!UBTTask_FlyTo::SchedulePathfindingRequest() [d:\build\++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\donainavigation\source\donainavigation\private\behaviortree\bttask_flyto.cpp:92]
                The cause is that pawn's current location is outside DonNavigation's bound.
                So, the NavigationManager variable point to nullptr. In C++, It's possible to dereference nullptr without getting exception but getting crash inside object instead.

                Comment


                  hello,
                  i've been using this plugin and its great, but i am wondering about using it for forward-flying objects like airplanes (or ships, limited to one Z plane) where there is no going sideways or backwards.... is there an easy way to limit the FLYTO movement to one axis (X or Y) so that my bot always goes "forward" and "turns" around obstacles? I've been trying to utilize this particular scenario and end up with bots travelling sideways or backwards, which is unrealistic. I've been searching this forum without much luck, perhaps I am overlooking a solution?
                  thanks!
                  - s

                  Comment


                    Originally posted by khazum View Post
                    hello,
                    i've been using this plugin and its great, but i am wondering about using it for forward-flying objects like airplanes (or ships, limited to one Z plane) where there is no going sideways or backwards.... is there an easy way to limit the FLYTO movement to one axis (X or Y) so that my bot always goes "forward" and "turns" around obstacles? I've been trying to utilize this particular scenario and end up with bots travelling sideways or backwards, which is unrealistic. I've been searching this forum without much luck, perhaps I am overlooking a solution?
                    thanks!
                    - s
                    My best guess is, you need to set separate object (obstacle) avoidance that kicks in, when it is needed. In fact, in my flying game experiments, with arcade-ish flying enemies, I have no path finding system "per se" at all. I have basic rules where to fly (to player, fly away from player, go random), and object avoidance (i call it "cat whiskers" because of line tracing likeness). For me, that works fine for now. You can see it "live" in my videos. I have been experimenting with this 3D pathfinding too (also there is a video), it was fine, but I have avoided it for now.

                    Comment


                      Originally posted by khazum View Post
                      hello,
                      i've been using this plugin and its great, but i am wondering about using it for forward-flying objects like airplanes (or ships, limited to one Z plane) where there is no going sideways or backwards.... is there an easy way to limit the FLYTO movement to one axis (X or Y) so that my bot always goes "forward" and "turns" around obstacles? I've been trying to utilize this particular scenario and end up with bots travelling sideways or backwards, which is unrealistic. I've been searching this forum without much luck, perhaps I am overlooking a solution?
                      thanks!
                      - s
                      One quick thing to try...can you set the AI unit focus to the direction of the units velocity? That should always turn the unit towards it's flight direction over time.

                      Alternatively, if you're in C++...have a look at UBTTask_FlyTo::TickPathNavigation. You can adjust that implementation to meet your needs.
                      Check out my ★★★★★ UE4 plugin if you want to go fast!
                      • Feedback Event Factory: Perfect for managing sounds, particle systems, force feedback, camera shakes, time dilation, animations & more...all within a single Blueprint!

                      Comment


                        I was trying to find the custom event customAddMovementInput like the one below for a day or two, but was having no luck. I can find the customAddMovementInput (message) and (interface), but not the (event). I see that the target of this custom event is DonNavigator, but neither did I find the object with the class DonNavigator, nor the class DonNavigator. I am using the bp plugin from Unreal MarketPlace. Am I missing something?

                        Comment


                          I see thanks. By the way, it seems like DoN's 3D-Pathfinding doesn't support Physics volume? If the Physics volume overlaps with the Don's Navigation Manager, the pawn/character won't move.
                          FYI, both "FindGoal" and "FlyTo" nodes in Behavior tree continuously flashes when Don's Navigation manager overlaps with Physics volume. If not, "FindGoal" is supposed to finish before "FlyTo".

                          Update:

                          These errors will pop up:
                          DoNNavigationLog: Warning: Pawn's initial/final position overlaps an obstacle. Attempting to find substitute vector (a nearby free spot) for pathfinding...
                          DoNNavigationLog: Error: Error: Invalid Origin (X=820.000 Y=810.000 Z=398.000) passed to navigation path solver
                          DoNNavigationLog: Error: Error: Invalid Destination (X=210.000 Y=-10760.000 Z=2000.000) passed to navigation path solver

                          Is the Don's Navigation Manager treating the physics volume as an obstacle?
                          Last edited by Paul_LTC; 08-25-2018, 07:43 PM.

                          Comment


                            Grot13 By the means of locomotion system, do you mean the skeletal system? If so, how did you change it such that it works in a water volume? Do you have to change something outside of Unreal? I haven't really had much experience on locomotion system before.

                            Btw, I've changed the settings of the character blueprint, such that the Default Movement Mode When In Water is Flying instead of Swimming. And for Nav Movement, I've disabled IsSwimming, and enabled IsFlying. However, it still doesn't move in the Physics Volume.

                            Comment


                              So, the plugin suddenly started making problems. Haven't changed anything about the nav, as I've been dealing with level design recently. And yet – what used to work, now crashes the engine.
                               
                              Spoiler

                              I've dealt with access violation once before, it was due to the pawn being out of the nav volume bounds. It is not the case this time, I made double-sure of that.

                              UE 4.20.2, Blueprint project
                              Relevant screenshots: https://imgur.com/gallery/PEV3uwx
                              Last edited by Angius; 08-29-2018, 02:17 PM.

                              Comment


                                This may be a stupid question because this specifies that it is a flying AI system, but is there a way to query the system for land-bound paths and to prevent traversal of steep slopes?
                                I have a relatively large voxel world with player-spawned structures, and while navmeshes work I am looking for a more optimized approach for NPC movement.
                                The system would not have to handly many actors at once, pathfinding would only be activated when a player is nearby and actively being chased.

                                If the system cannot be used in this scenario I would appreciate any pointers for other options.
                                Thank you!

                                Comment

                                Working...
                                X