<br>(This is a translation of a [Japanese [Content removed] by AXEL PROTO.)
I would like to ask about an issue of the ZoneGraph feature in Unreal Engine, as I am experiencing an issue where it does not behave as expected.
Summary:
When building a ZoneGraph, I saw a case where Adjacent lanes (links of the Adjacent type) were not be registered correctly under certain conditions.
I’d appreciate it if you could let me know whether this behavior is intended or a bug. If it’s a bug, I would like to know if there’s a plan for addressing it.
Prerequisites I understand:
I understand that in the current system, the lane data in ZoneGraph contains a range index of LaneLinks to maintain connection information, and that there are three types of links:
- Outgoing: connections that go away from the current lane
- Incoming: connections that come into the current lane
- Adjacent: connections of lanes that are adjacent
I expect that the Adjacent links should always be registered mutually.
Issue I am experiencing:
Under specific conditions, adjacent lanes may not be mutually registered as links of the Adjacent type. Specifically, I have confirmed the following when Lane A and Lane B are adjacent:
(i) Lane B is registered as Adjacent in the Links of Lane A.
(ii) However, Lane A is not registered as Adjacent in the Links of Lane B.
Conditions for occurrence:
As far as I confirmed in my environment, this issue occurs under the following conditions:
(a) The type of ZoneShape is Polygon.
(b) Different lane profiles are set for each vertex.
(c) On a lane that connects between a vertex with a narrow lane profile and a vertex with a wider lane profile.
Cause of the issue:
Looking into the code of ZoneGraphBuilder, I guess that this might occur due to the implementation of FZoneGraphBuilder::ConnectLanes().
It seems that Polygon-type lanes are not registered as InternalLinks before this function is called, and that the links are calculated when the following condition is true:
if (AdjacentLaneCount == 0)
In this section of the code, there is a comment stating “Assumes adjacent lanes have the same width.” However, this assumption is not always true when different lane profiles are set for each vertex. As a result, when a narrow lane connects to a wider lane, the assumption is not true, so that adjacent links are not registered.
Related issues:
Due to this behavior, for example, if a crowd is implemented as in CitySample and the crowd needs to make a U-turn on a Polygon type lane that connects lanes of different widths, the route may not be calculated as the adjacent lanes cannot be obtained.
Questions:
(1) Is this behavior intended or a bug?
(2) If it is a bug, is there a plan to fix this?
(3) If there is a recommended workaround to register adjacent links correctly in a Polygon-type ZoneShape with different lane profiles for each vertex, please let me know.
(4) I am using a Spline-type ZoneShape with lane profiles of different widths for connection. If there is any better method, please let me know.
Thank you in advance.