You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Humans would generally rather take 1 turn than 3, even if it's slightly quicker to take 3. (They'll take 3 if it avoids traffic, but the existing extra costs for high-traffic segments will handle that fine.)
A variety of useful road arrangements add very sharp turns that are technically possible (screenshot below for what I mean) but generally not what anyone wants. (It's great that the lane connectors or arrows tools can fix this, but it would be nice if the pathfinder just discouraged them strongly to begin with.)
It's normal for GPSs to do something like this, to avoid overloading the driver with directions for minimal value. (So having this would make the traffic routes tool show something that looks more like the routes you'd see on a maps app.)
In more complicated intersections (than just right-angle ones) it would be nice to encourage vehicles to take more gentle turns instead of sharper ones.
This can also help keep diamond interchanges on a curve from sometimes looking like taking the ramp is better than staying on the highway (particularly if one uses 2-lane highways as ramps) as it would add a bit of extra penalty for the exit.
Screenshots?
What I mean by sharp left turns:
Notes or questions?
So as concrete a starting point, I'd propose something like this:
ϴ (°)
cos ϴ = â·b̂
penalty
notes
0 to 30
1 to 0.866
zero
the game shows a straight arrow in this range, so treat it like no turn (that also keeps from penalizing non-corner nodes)
30 to 70
0.866 to 0.342
low
this covers the shallowest reasonable turns off a road that continues straight (like a highway exit)
70 to 110
0.342 to −0.342
normal
most would hit this, particularly ⦜ turns
110 to 150
−0.342 to −0.866
high
not always bad, but fine to penalize more strongly
150 to 180
−0.866 to −1
blocked
this is only possible with anarchy, and is usually already blocked by the acuteTurningAngle check
(I don't know what low/normal/high would mean exactly; I figured I'd start with something like low*2 = normal = high/2.)
As a picture, to help visualize the 5 segments:
If this sounds plausible I'd be happy to give implementing it a shot -- looks like it'd need to happen in ProcessItemCosts? Perhaps always calculate the dirDotProd, default the (max)turningAngle to 0.866f instead of 1f to handle the blocked section, then add a bit more to duration based on the direction change...
The text was updated successfully, but these errors were encountered:
Describe your idea
I have a few goals with this:
Screenshots?
What I mean by sharp left turns:

Notes or questions?
So as concrete a starting point, I'd propose something like this:
acuteTurningAngle
check(I don't know what low/normal/high would mean exactly; I figured I'd start with something like
low*2 = normal = high/2
.)As a picture, to help visualize the 5 segments:

If this sounds plausible I'd be happy to give implementing it a shot -- looks like it'd need to happen in
ProcessItemCosts
? Perhaps always calculate thedirDotProd
, default the (max)turningAngle
to0.866f
instead of1f
to handle the blocked section, then add a bit more toduration
based on the direction change...The text was updated successfully, but these errors were encountered: