Announcement

Collapse
No announcement yet.

DoN's 3D Pathfinding for Flying A.I. [Support Thread]

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

    #61
    Originally posted by VSZ View Post
    I would still recommend the same debug strategy: You need to see what is happening inside your pawn's Add Movement Input code and why it is not responding to movement requests for this case.

    Going by your description that a) the path is generated successfully and b) The Fly To node is busy/active in the behavior tree. If both of these conditions are indeed satisfied, the plugin's work pretty much ends there and it is up to the pawn to do the rest. That's why you need to check what your pawn's Add Movement Input is doing.

    Now if the path was not generated, then there are other factors to consider like insufficient clearance area above the floor for either your pawn or for its goal (which can be solved by nudging the height of the goal/etc). However that's likely to happen only for large bots and if something like that did happen, the logs would have definitely told you why pathfinding did not occur. In your case the logs are clean, so the issue is likely elsewhere.
    Ok I added the interface and implemented the "Add Movement Input Custom but I'm still getting the same results. If there is no obstacle between the flying unit and it's goal, it flies towards the goal and the expected output comes from the event. However, if I move the obstacle between the flying unit and goal, there is no output from the event.

    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	123.7 KB
ID:	1132583
    Last edited by Dirtsleeper; 08-17-2017, 01:52 PM. Reason: Image

    Comment


      #62
      Originally posted by Dirtsleeper View Post
      Ok I added the interface and implemented the "Add Movement Input Custom but I'm still getting the same results. If there is no obstacle between the flying unit and it's goal, it flies towards the goal and the expected output comes from the event. However, if I move the obstacle between the flying unit and goal, there is no output from the event.
      Is the navigation path being generated correctly in all these cases and is Fly To still running on the BT? I don't think a case like this has been encountered before. Do you have multi-threading enabled by any chance?

      Without anything in the logs at this point it's hard to guess what's going on. If you're comfortable with debugging I suggest putting a breakpoint inside BTTask_FlyTo.cpp's TickTask function. It should be easy to tell exactly what's going on by doing that.

      Another approach is to carefully compare your setup with the sample project's manager class, its pawns and its behavior trees.

      Steam Early Access: Drunk On Nectar - The Nature Simulator

      UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

      Comment


        #63
        Originally posted by VSZ View Post
        Is the navigation path being generated correctly in all these cases and is Fly To still running on the BT? I don't think a case like this has been encountered before. Do you have multi-threading enabled by any chance?

        Without anything in the logs at this point it's hard to guess what's going on. If you're comfortable with debugging I suggest putting a breakpoint inside BTTask_FlyTo.cpp's TickTask function. It should be easy to tell exactly what's going on by doing that.

        Another approach is to carefully compare your setup with the sample project's manager class, its pawns and its behavior trees.
        Yes, the path is correct and it's still running. Multi-threading is not enabled.

        I debugged it and it's completely skipping the switch case in the TickTask function "switch (myMemory->QueryResults.QueryStatus)"

        When the obstacle is not there, this switch succeeds correctly. However, when the obstacle is there, it doesn't even enter the switch statement.

        Comment


          #64
          Originally posted by Dirtsleeper View Post
          I debugged it and it's completely skipping the switch case in the TickTask function "switch (myMemory->QueryResults.QueryStatus)".
          That means the path solution is still being generated and Fly To is waiting for the path to arrive, so I'm surprised that you're seeing the path being generated at all in the first place.

          Best bet then is to directly debug DoNNavigationManager.cpp's TickScheduledPathfindingTasks function. At this point only that can tell us whether your path was truly generated or if there is some other setup quirk that is preventing the data from being relayed...

          Steam Early Access: Drunk On Nectar - The Nature Simulator

          UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

          Comment


            #65
            Originally posted by VSZ View Post
            That means the path solution is still being generated and Fly To is waiting for the path to arrive, so I'm surprised that you're seeing the path being generated at all in the first place.

            Best bet then is to directly debug DoNNavigationManager.cpp's TickScheduledPathfindingTasks function. At this point only that can tell us whether your path was truly generated or if there is some other setup quirk that is preventing the data from being relayed...
            Ok I stepped through everything like you said and I am reaching line 2487 "data.QueryStatus = EDonNavigationQueryStatus::Success; // Finally, the task has succeeded!" but there's still no movement. Where should I look next?

            Comment


              #66
              Originally posted by Dirtsleeper View Post
              Ok I stepped through everything like you said and I am reaching line 2487 "data.QueryStatus = EDonNavigationQueryStatus::Success; // Finally, the task has succeeded!" but there's still no movement. Where should I look next?
              At the bottom of TickScheduledPathfindingTasks you will find CompleteNavigationTask(i);. Inside that the ResultHandler delegate is what notifies the FlyTo task that it can begin routing locomotion to your pawn. If that delegate worked, it should invoke UBTTask_FlyTo::Pathfinding_OnFinish function inside BTTask_FlyTo.cpp.

              I'd take a step back and compare your setup with the sample project first though; behavior trees, pawns, manager setup, everything. This kind of low-level issue hasn't been reported before so might be easier to first run your usecases in the sample project first and then migrate them out to yours.

              Steam Early Access: Drunk On Nectar - The Nature Simulator

              UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

              Comment


                #67
                Originally posted by VSZ View Post
                At the bottom of TickScheduledPathfindingTasks you will find CompleteNavigationTask(i);. Inside that the ResultHandler delegate is what notifies the FlyTo task that it can begin routing locomotion to your pawn. If that delegate worked, it should invoke UBTTask_FlyTo::Pathfinding_OnFinish function inside BTTask_FlyTo.cpp.

                I'd take a step back and compare your setup with the sample project first though; behavior trees, pawns, manager setup, everything. This kind of low-level issue hasn't been reported before so might be easier to first run your usecases in the sample project first and then migrate them out to yours.
                It seems as if the UBTTask_FlyTo::Pathfinding_OnFinish() is being called after the path is generated.

                Comment


                  #68
                  Major Update & 4.17 release

                  What's New:

                  Full Multi-threading support!
                  • Multi-threading code has been rewritten from scratch and is now robust and ready for use. It is now enabled by default.
                  • Significant performance boosts - both for your frame rates and for your bot's reactivity.
                  • This means Infinite map size (via Unbound manager) + Large number of A.I is now finally a very viable option!




                  Major bugfixes to navigation solver
                  • Bots no longer get stuck while lying flush with a wall or obstacle (initial overlap usecase)
                  • This was an issue reproducible in the sample project and reported by a user. As always, issues reported via the sample project are easiest to reproduce and investigate.
                  • Improved nav request scheduling (redundant aborts eliminated and more)


                  Community Contributions

                  Thanks to Vladimir Ivanov for:
                  • Multiple manager support via actor based manager selection (very common request!)
                  • Path recalculation support for Flight Location key
                  • EQS tasks that expose the CanNavgate and RandomNavigableLocation functions and fix for FlyTo node usage with SimpleParallel node.

                  Thanks to Michael Brune for:
                  • 4.17 migration code to get me started quickly
                  • Blueprint Nativization friendly code changes (n.b. more changes may be needed in this space, either in the nativizer itself or in code)





                  Downloads

                  Check out my new plugin!
                  A significant amount of effort was needed to get this update out, not just in building the features but in merging four different code bases together and testing some very time-consuming edge cases.

                  I request that if you found this plugin useful, please also check out my new DoN plugin - Mesh Painting & Gameplay solution for UE4, a very feature-rich plugin catering to many different usecases for both FX and gameplay.
                  Chances are you may find something you need for your project in there!

                  See the new plugin's Marketplace Link, Video Trailer and Forum thread for more.

                  --

                  Enjoy this update!

                  - Venugopalan Sreedharan
                  Attached Files
                  Last edited by VSZ; 08-22-2017, 01:44 AM.

                  Steam Early Access: Drunk On Nectar - The Nature Simulator

                  UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

                  Comment


                    #69
                    Originally posted by VSZ View Post
                    I request that if you found this plugin useful, please also check out my new DoN plugin - Mesh Painting & Gameplay solution for UE4, a very feature-rich plugin catering to many different usecases for both FX and gameplay. Chances are you may find something you need for your project in there!
                    Have you considered adding the ability to make a donation for this plugin, as well? I would love to make a direct contribution for all your work
                    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


                      #70
                      ^ Hey No plans atm but I do appreciate the thought [MENTION=43607]rcdarcey[/MENTION] !

                      Steam Early Access: Drunk On Nectar - The Nature Simulator

                      UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

                      Comment


                        #71
                        Thanks for the update, [MENTION=14603]VSZ[/MENTION].

                        I have a question. In my project on the second and further play (PIE) it starts logging warning:

                        LogStats: Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//DonNavigationWorker///Thread_1998_0///####STATCAT_Advanced#### old //STATGROUP_Threads//DonNavigationWorker///Thread_14cc_0///####STATCAT_Advanced####
                        Is it a normal thing? Didn't test it in packaged project yet.

                        Comment


                          #72
                          Originally posted by Barnacle-Rus View Post
                          Thanks for the update, [MENTION=14603]VSZ[/MENTION].

                          I have a question. In my project on the second and further play (PIE) it starts logging warning:


                          Is it a normal thing? Didn't test it in packaged project yet.
                          Should be innocuous, probably a PIE quirk. Appeasing it would be nice, but a nice-to-have for the next engine update maybe.

                          Steam Early Access: Drunk On Nectar - The Nature Simulator

                          UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

                          Comment


                            #73
                            Can we have option to turn off the debugging in editor? When you have many actors using it, it is not really useful.

                            Comment


                              #74
                              Originally posted by overreal View Post
                              Can we have option to turn off the debugging in editor? When you have many actors using it, it is not really useful.
                              Go to the "Debug Params" category on your Fly To node. There will you find several debug flags including "Visualize Optimized Path" / "Visualize Raw Path", etc.

                              You are seeing these debug lines because one of those flags is set to true.


                              Steam Early Access: Drunk On Nectar - The Nature Simulator

                              UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

                              Comment


                                #75
                                Hi don!

                                Im having a really hard task here, as i get no errors in my logg.
                                Im trying to use the flyto, but its not working properly
                                im currently using 4.16 and is bound to that version because i have a big project.

                                the problem here is that the don event do not trigger.
                                i have the interface both in the ai controller and the pawn, and i tried both of them, but none of them are triggering.

                                i have tried all 3 actors:
                                character actor
                                pawn actor
                                default flying pawn actor

                                i have tried making a new ai controller
                                i have tried to bind the interface again

                                There is no errors in the logg what so ever, and the actor see me through perception and sets the location
                                i print string the location and its an actual location of the actor to follow.

                                Comment

                                Working...
                                X