I’m currently developing a 2D game in Unity that features a dynamically generated map with distinctive terrain types: islands (land) and water. The terrain generation is based on a Perlin noise algorithm, resulting in multiple disjointed islands amidst water. Additionally, the terrain differentiation is visually supported by two extra textures (with configurable alpha and rgb values) serving as masks/colliders for Land and Water, designating walkable and non-walkable areas.
My primary concern involves setting up pathfinding in this varied terrain environment. Specifically, while attempting to utilize a RecastGraph to accommodate the game’s non-grid-based, free movement:
Water areas, being large and contiguous, work well with RecastGraphs using colliders to mark non-walkable areas.
Islands, comprising disconnected entities, pose challenges. The pathfinding graph does not generate effectively around these smaller, scattered landmasses using similar collider-based approaches.
Using a GridGraph and setting a TileRule with a Texture works, however, the game is NOT based on a grid, nor is the movement.
How could I handle this use case? Thank you very much!