Open originalfoo opened 3 years ago
Pedestrian crossing detection for segments with pavement on one side is not supported in our PathFinding (nor in vanilla), might be related to #786
Here is an asset that reproduces the problem: https://steamcommunity.com/sharedfiles/filedetails/?id=2668761312
a small-ish savegame that uses it: https://steamcommunity.com/sharedfiles/filedetails/?id=2668762129
a video of it happening: https://www.youtube.com/watch?v=lJDRIjEk458
In my limited testing, pedestrians seem to mostly do what I expect them to when there is only a pedestrian lane on one side. I just want them to stop jaywalking. ;-)
On a hunch, I placed my test road in a developed area to see what would happen. As I suspected, pedestrians follow their designated lane to their destination, then just walk right across the street. Maybe the logic that makes this possible needs to check and make sure it's not happening at an intersection.
To put it another way, only allow this uncontrolled crossing on segments. On nodes, follow the normal rules for crossing the street.
To put it another way, only allow this uncontrolled crossing on segments
What do you mean? It's impossible for pedestrian to cross road/segment without a node. pedestrian crossing are always created on the node, there is no exception from that rule.
Is there a node at the location when they were crossing? IIRC pedestrians can cross at bend nodes as well as junction nodes.
The nearest nodes are the highlighted rectangles on the left and right.
OK, I know where is the problem. How they suppose to get to that building if road connected to is has pavement on one side? I'm pretty sure that pathfinding fall back to default behavior as it uses for pavement/bike paths - they don't need to be connected and cim selects the shortest gap between two lanes, which in this case means crossing the segment because continuing the walk to the node would be pointless - there is no pavement path on the other side anyways (that variant will have worse overall pathfinding score).
Yes, this was all my conclusion as well, minus the implementation details that I'm not familiar with.
So what if the logic that handles this is also in control when they cross at an intersection? That's my theory. But since I don't actually know how the code works..... 🤷♂️
Another interesting behavior that might be related is that when the pedestrian lane on one side ends, forcing pedestrians to cross to the other side, their movement suggests to me that it's being treated like a lane change rather than a street crossing.
But when a cross street is added at the node, newly spawned pedestrians cross at the crosswalk as expected (still ignoring the light).
Describe the problem
Steam used Elesbaan noted:
Steps to reproduce
I've asked user for links to assets which exhibit the problem.
Log files
n/a
Savegame?
I've asked user to provide a savegame.
Screenshots?
n/a