ORilot / DiscordStuff

A little play around with the Webhook feature of discord
0 stars 0 forks source link

Intersection improvement #15

Open sync-by-unito[bot] opened 5 months ago

sync-by-unito[bot] commented 5 months ago

We need to add smoother transitions from when the travellers reach a node, and swap the edge that they’re travelling on, instead of jumping from one to the other. This should be visually pleasing, without having negative repercussions for performance or the simulation.

This can likely be done by having an animation phase in the WaypointMover’s trajectory, and interpolating between the start and end positions.

Beyond that, this will likely require some restructuring, particularly to determine the specific location of lanes to transition between.

┆Issue is synchronized with this Trello card by Unito ┆Attachments: null.png

sync-by-unito[bot] commented 5 months ago

➤ Zdenek Plesek commented:

Do you mean at the junction? A simple animation to transition between lanes is not overtly complicated.

But there is a better way to do it, that allows the travellers to also block each other while they are at the junction. That is to convert, before the simulation start, each node into a small graph structure, that has all of the road transitions represented by an edge. (See attachment titled null.png)

Note that some additional logic will be required to prevent cars entering an edge if an intersecting edge is occupied.

This will require:

Quick work-around for working out if the two edges intersect is to just assume that all junction edges intersect. This will mean that the junction will only be usable in one direction, one-entry-to-one-exit point, while there are any cars on it. But that is not the worst scenario.