Forum rules - please read before posting.

Inspiration: PolyNav

Hey guys,

I was just browsing some Unity 2D websites when I came across this new plugin called PolyNav, and it seems like a perfect fit to receive integration with AC! What it does is you can draw navmeshes using polygons and vertices, so no more layering navmesh segments to achieve slanted edges or rounded corners. It looks really simple and it's what I dreamt of when I was working with navmesh segments.


I'm not sure if you can bake a navmesh from the resulting mesh there, it looks like the plugin has its own version of the Paths script (it uses A*) that it uses to make characters walk on it, so it's not a ready-made solution but maybe Chris can attempt a collaboration to make the two compatible? That would be rad.

Comments

  • Interesting.  Will take a look, thanks.
  • I'd love to know what your thoughts were on this Chris. Is it something where compatibility might be supported in a future update? Being able to draw polygonal areas direct into the scene rather than needing to create .obj meshes would be amazing, not to mention the edge offset features of that plugin.

    If support is not likely, then could an option be added to the current AC system to enable us to lay down predefined 'best / most natural routes' around a floorspace - where characters use those paths / nodes to navigate by until they are able to make a direct line to their destination?

    At the moment I find my characters are walking as close to walls and corners as possible, occasionally also going via a mesh vertex in an obscure corner for no apparent reason, which looks a bit unnatural at times. (Unless I'm just missing an important step with using imported meshes, which is quite possible!)
  • I haven't had time to fully look into it yet, but I can see that it relies on Unity's native 2D view to work - which would mean having to rotate your entire scene and markers etc if you were previously using Top Down mode, and not at all if your game is in 3D.

    Which Navigation Engine are you currently using?  Unity Navigation will be more reliable than the Mesh Collider one - you can set this as a per-scene option, so you can mix-and-match according to your needs.
  • I'm using Mesh Collider as I wanted the flexibility to swap out different walk areas without having to sort of fudge it with using collision cubes to hide walk areas. Also, building certain outlines accurately with layered nav segments can get a bit fiddly. But you are likely correct that I should mix and match for now.

    My scenes are indeed in top down 2D mode at the moment, so it sounds like that could cause some problems if we'd need to rotate everything haha. Am I right in thinking that you chose to use top down as otherwise gravity would need disabling and we'd have to have the characters propel themselves around the scene instead?
  • A few reasons, that being one of them.  The bigger issue is that Unity's Navigation only works in the X/Z plane.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.