question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[EPIC] UI: Routing Tool

See original GitHub issue

This tool visually combines the features of the Lane Arrows and Lane Connectors tools.

Lane Arrows

Current implementation is floating panels with buttons for each direction. I find this a bit confusing to use, and clunky to work with. Maybe using arrow glyphs (rather than characters) on the buttons would be better, where only one button (and thus glyph) can be active at a time?

Also, it would be nice if we could add a few new arrows?

  • Deflect = Driver should start moving in to adjacent lane
    • Used when a lane is closing (eg. road narrows) or some obstruction ahead (eg. roadworks)
  • Merge = Driver must merge in to adjacent lane
    • Used when a lane cannot continue ‘straight ahead’
  • Diverge = Driver may diverge in to adjacent lane
    • Used when additional lanes become available, or when there’s a slip road, etc.

Issue: Most roads don’t have deflect, merge or diverge arrows. Some roads do, but only via supplemental lane marking asset packs. We’d need some way for user to choose which decals to use to represent the new arrows, possibly via integration with Find It! mod.

Two other things:

The full list of arrows:

  • L: Left
  • LF: Left-Forward
  • F: Forward
  • LFR: Left-Forward-Right
  • LR: Left-Right
  • FR: Forward-Right
  • R: Right
  • DL: Deflect Left (new)
  • DR: Deflect Right (new)
  • ML: Merge Left (new)
  • MR: Merge right (new)
  • IL: Diverge left (new)
  • IR: Diverge right (new)

They could be arranged in a grid, something like:

IL LF F FR IR
ML L LFR R MR
H  DL LR DR  X

With the exception of H (hide) and X (reset), all the arrows equate to lane connections. Depending on what’s attached to the nearby node, some arrows would be unavailable. For example, at road junction, the diverge, deflect and merge arrows would not be applicable. Diverge and merge are only available when a road widens or narrows, respectively. Deflect only applicable on normal nodes where both segments are same number of lanes. Left turn only applicable if there is a left turn, and so on…

As inferred from the above, it’s not just at junctions where the lane arrow tool is applicable; it’s also useful at nodes where different types, or even same type, of road meet.

When hovering over an arrow button in the panel, the following happens:

  • Source lane is highlighted (see #33)
  • Lane connectors are shown to clearly indicate what lanes it connects to
  • Destination lanes are highlighted too

This way the user has zero doubt as to what effect the arrow will have if they choose it.

If any of that sounds feasible, let me know and I’ll do a quick graphic mockup of the grid layout.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
originalfoocommented, Feb 9, 2019

UI Mockup

Please excuse the shit diagram 😉

routing

Quite a lot of changes here, as you can see.

Less right-clicking

Now that we differentiate between incoming (square) and outgoing (triangle) nodes, there’s no need to hide incoming nodes when routing a specific node.

Right click can still be used to deselect the current source node, however users can now simply click a different source node to route from that instead.

Squares:

  • These are source nodes
  • Colours:
    • White square = using standard lane arrow (see later) setting
    • Coloured square = custom lane connections
  • Outline width:
    • Thick = the segment you are currently altering (in this case, user is altering the lower road)
    • Thin = all other segments
  • Filled square indicates which source lane is currently selected
  • Right-click a square (or eraser tool it) to reset its lane arrow and connections to default

Triangles:

Note: To further distinguish between squares and triangles, the squares could be flush with the end of the road segment (like bottom and right in the image above) and triangles could be offset from the road edge (like right segment in image above).

  • These are destination nodes
  • They appear when a source lane is selected (filled square)
    • Only valid outgoing lanes (for selected incoming lane) are shown
    • For example, you can’t route a road lane to a bike lane
  • Colours:
    • Yellow = same segment as source (eg. if you want u-turn, connect square to yellow triangle)
      • These could potentially have thinner width?
    • White = other segments
  • Fill:
    • Filled = there’s a route to it from the current source segment
    • Empty = there’s no route from the current segment
    • This makes it really obvious if I’ve missed a connection
  • If no incoming lane is selected, the triangles disappear. However, if there are any outgoing lanes that have no connections at all (from any source) their triangles could show (when there’s no active source lane selection). This would alert me that one of my lanes is inaccessible at the junction/node.

As I add custom lane routes, the source lane arrows are updated accordingly to best match the connections.

Lane arrows

I need to spend some time pondering the interaction model of this, but initial ideas jotted below…

When a source (filled square) is selected, the lane arrows palette appears, filtered to valid arrows for that source lane.

  • Hover over a lane arrow (in palette) to see what change will be (this takes account of any key modifiers pressed)
  • Click: Clear existing connections from that source and apply those associated with the lane arrow
  • Shift+Click: Add lane arrow connections to existing connections
  • Alt+Click: Subtract lane arrow connections from existing connections

In any case where current connections for a lane match a standard lane arrow, the connection lines go thin white to indicate a standard set of connections. This is on a lane by lane basis. It makes it easy to see which lanes are using normal road/highway rules (those with thin white line connectors) and which are using customised rules (thick coloured lines).

1reaction
kianzarrincommented, Apr 27, 2022

No the middle lane of the round about should go to the outer lane of the roundabout. I think there should be a yellow circle in the middle lane of the roundabout. as for the connecting road, there should be a blue circle on the outermost lane but that might be hard to calculate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UI Interface | Epic Online Services Developer
Interface that accesses overlay features. ... useful when making certain high-level decisions, such as where to route input, or when to pause simulation....
Read more >
The Epic Stack | Epic Web Dev by Kent C. Dodds
Introducing an opinionated project starter that enables web development teams to ship their ideas to production more efficiently.
Read more >
Common UI
A new Input Routing system that can give UI widgets selective interactivity, making it easier to manage focus in multi-layered UIs.
Read more >
open.epic :: Explore By Interface Type
Receives data about encounters that happen at an outside entity. These encounters can then be used by care managers to follow up with...
Read more >
Introduction to Common UI | Inside Unreal - YouTube
What is one of the most fundamental pieces of any project? If you guessed UI, you'd be right! Even though it's a necessary...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found