Announcement

Collapse
No announcement yet.

NavGrid - Turn based navigation on a grid

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

    [PLUGIN] NavGrid - Turn based navigation on a grid

    Hi guys



    I've made a plugin for turn based movement on a grid and I thought it might be useful for others.

    The source code and basic documentation is available from: https://github.com/larsjsol/NavGrid

    Any comments and bug reports will be appreciated

    #2
    Looks pretty cool! I'll definitely be checking it out tomorrow.

    Comment


      #3
      Thanks,very helpful for learning!

      Comment


        #4
        This is some good stuff

        Comment


          #5
          Originally posted by larsjsol View Post
          Hi guys



          I've made a plugin for turn based movement on a grid and I thought it might be useful for others.

          The source code and basic documentation is available from: https://github.com/larsjsol/NavGrid

          Any comments and bug reports will be appreciated
          Hi larsjsol!

          Great plugin! The demo you provided works great and really is impressive!
          I have some issues integrating it into my projects though, and I'm here to ask for your help.

          (Edit: everything is working now)

          So, I have installed the plugin and it was built successfully. I have created new collision channel "Tiles". In my custom GameMode player controller have been set to NavGridExamplePC. Created NavGrid and I was able to generate tiles using TileGeneratorVolume. If I press play I see the white circle cursor apearing and disapearing on them as I move my mouse around. But when I place ExampleGridPawn and press play nothing is changed. The pawn doesn't react in any way. It doesn't even have SelectedHighlight turned on.

          I've tried to do same steps in the demo project from you, and everything works. if I place just ExampleGridPawn in empty level (only with NavGrid, otherwise it crushes ) it shows SelectedHighlight mesh when Play is on, so I can see it's working.

          Any ideas on how can I fix it?

          Edit:

          It seems like only version 2.2.2 have this problem. I've tried to rebuild it with 2.2.0 version from the demo and everything works fine. I should probably start a new issue on github.


          Edit again:
          Disregard everything above!
          It's embarrasing. I've cloned master brunch directly. Tried release version 2.2.2 and it works without problem.

          The only thing probably need adressing is a check on pawn if NavGrid exist. Right now it crashes whenever you forget to put NavGrid in scene
          Love the plugin, Good Luck!

          Edit again and again: I see you have checks for NavGrid. But crashes do occur anyway. Does it get NULL somewhere else?
          Last edited by AyanMiru; 01-24-2018, 10:18 AM.

          Comment


            #6
            Originally posted by AyanMiru View Post

            Hi larsjsol!

            Great plugin! The demo you provided works great and really is impressive!
            I have some issues integrating it into my projects though, and I'm here to ask for your help.

            (Edit: everything is working now)

            So, I have installed the plugin and it was built successfully. I have created new collision channel "Tiles". In my custom GameMode player controller have been set to NavGridExamplePC. Created NavGrid and I was able to generate tiles using TileGeneratorVolume. If I press play I see the white circle cursor apearing and disapearing on them as I move my mouse around. But when I place ExampleGridPawn and press play nothing is changed. The pawn doesn't react in any way. It doesn't even have SelectedHighlight turned on.

            I've tried to do same steps in the demo project from you, and everything works. if I place just ExampleGridPawn in empty level (only with NavGrid, otherwise it crushes ) it shows SelectedHighlight mesh when Play is on, so I can see it's working.

            Any ideas on how can I fix it?

            Edit:

            It seems like only version 2.2.2 have this problem. I've tried to rebuild it with 2.2.0 version from the demo and everything works fine. I should probably start a new issue on github.


            Edit again:
            Disregard everything above!
            It's embarrasing. I've cloned master brunch directly. Tried release version 2.2.2 and it works without problem.

            The only thing probably need adressing is a check on pawn if NavGrid exist. Right now it crashes whenever you forget to put NavGrid in scene
            Love the plugin, Good Luck!

            Edit again and again: I see you have checks for NavGrid. But crashes do occur anyway. Does it get NULL somewhere else?
            Sorry about the late reply AyanMiru. I have not been keeping tabs on the forums for a while.

            Did you get it working in the end? Version 2.2.2 should work, but it is also possible that you have found a bug

            If it is still crashing, perhaps you could send me a stacktrace? You can get it by starting you project by pressing the "Local Windows Debugger"-button in Visual Studio. Alternatively, you could send me your project and I will take a look.

            -larsjsol

            Comment


              #7
              Hi larsjsol!
              Yes the release version works~ It's still crashing, although only when NavGrid is not in the scene, so it's avoidable. It's reproducable in fresh project as well. I've run "Local Windows Debugger" in new 4.18 project I named "NavGridTest" with 2.2.2 Release, added ExampleGridPawn and this is Debug output:
               
              Spoiler

              Some screenshots just in case:
               
              Spoiler


              The issue with master branch also still persist, although now it crashes instead of simply not interacting with pawn.
              I hope it helps! Tell me if you need some more info

              Comment


                #8
                Hm. It looks like it fails when it is unable to find a NavGrid actor in the level.

                If you have placed one in your level and still see this error, you could try running form the latest commit in the master branch. You will have to set the game mode to "NavGridGameMode" and the rest should just work.

                Good luck!

                Comment

                Working...
                X