reckfellENGINE

Connecting regions: grid merging and edge margin

Check seams without accidentally permitting forbidden passages.

On this page

Neighboring navigation regions have two distinct connection mechanisms: edge merging through the map grid and additional near-edge connections using a margin. edge_connection_margin controls the latter. Increasing it does not repair arbitrary geometry and may permit unintended passages.

Check in order

  1. Confirm that the regions are enabled and belong to one map. Separate maps are isolated.
  2. Inspect navigation boundaries after transformation and baking, rather than only visual models.
  3. Check region-layer overlap with the query mask.
  4. Check additional connections on the map (MapSetUseEdgeConnections) and regions (RegionSetUseEdgeConnections).
  5. Configure MapSetEdgeConnectionMargin in map units and wait for publication.
  6. Run fresh queries in both directions and compare endpoints with targets.

For a ladder, jump, conditional door or teleport, use NavigationLink and transition logic. Do not bridge such a gap with an enormous margin just to obtain path points.

Concrete 2D margin check

The executed fixture has rectangles at x=0–10 and x=12.5–22.5 with the same y=0–10 range, leaving a 2.5-unit gap.

  • Margin 0.1 does not produce a complete route to the second region.
  • Margin 3 connects the parallel boundaries; the first region RegionGetConnectionsCount becomes positive.
  • Disabling additional connections on the map or second region breaks the route again.

This checks one parallel-edge configuration, rather than guaranteeing arbitrary edge connections within a distance. Partial overlaps, intersections and poor topology require navigation-geometry repairs.

Why a small gap may merge without margin

Merging uses grid vertex keys derived from coordinates and cell size. A rule requiring exact float-coordinate equality is therefore too simplistic.

In a separate check with cell size 1, boundaries at x=10 and x=10.5 merged even with additional connections disabled and margin 0.1. This depends on the specific grid and geometry: do not rely on a small visible gap to prohibit navigation. Use correct topology, layers or separate maps to express a prohibition.

Baking cell size and the map merge grid both affect accuracy, but operate at different stages. Do not change them blindly to fix one seam: compare final boundaries and paths after changes.

Define success

A fresh route should connect the intended surfaces rather than merely contain points. Check both endpoints and physical traversability. A navigation connection over a gap does not add a floor or collider.

Keep map parameters with reproducible geometry. This suite checks gap/margin, connection switches, connection count and a subcell gap example in 2D only. 3D connections, complex overlaps, physical clearance and rebuild cost were not measured.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.