Custom Edge Avoidance Mechanic

An early problem was that agents ignored the boundaries of the map and wandered out of the area. Standard wall avoidance behaviours failed to work correctly, so I developed a custom “edge avoidance” mechanic. This checked the plane’s bounds and applied steering forces when agents approached the edges, successfully keeping them inside the play area.