-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Establish connections between RoadContainers #133
Conversation
Correctly identifies now when selecting a Container and finding the closest point on that container to treat as the source connection, and draw the line to another container restricted to only open edges. Works inside container scene or between nested scenes.
While working on this, we need to address a few scenarios. Subscene below refers to a scene file saved to disk, added as an instance in the open scene where the editing is being done. Once we have all below scenarios implemented (along with some testing), this will conclude the v0.4.0 release:
Further future:
|
Also introduces a reusable utility for checking if a RoadContainer is in a saved scene or is a scene-root.
This ensures consistency with the concept of saved scenes to prevent conflicts. This also restores the ability to add points with only the RoadManager selected, to easily start drawing new roads (with a new RoadContainer added on the first click)
Added some tests as well, and some placeholder tests to get to. All tests passing except the two marked as pending.
Also renames the getter/setter functions for the next/prior_pt_init. Also fixes a bug of which index was being selected in the connect_container code.
Some good progress so far, with new coverage tests included. We don't yet have auto creation of new RoadPoints on placement yet, but that's the next step, and should largely be able to leverage the current existing rp placement do/undo functions in sequence with the connect/disconnect functions. What remains is a way to visualize the undo step, ie the "disconnect" tool between different RoadContainers, as right now there's no clear way to do that. Expecting that:
|
Need to clean up the commit still, but this is great progress here, basically wrapping up the outstanding items above: demo.cross.scene.connections.mp4 |
Oh and of course, right after posting the video do I first notice the issue of flipped lane order depending on the order of connections/directions the edge RoadPoints are facing. Hm will need to contemplate that one further how best to solve. |
Just uncovered this issue, but after some investigating, this is not something introduced by the changes here. So will track it as a separate bug. |
With this final push, I'm calling this good for now - there might still be some edge cases, and there are some user interactions which aren't really refined right now (e.g. disconnecting containers where they already have overlap), but it's a good enough starting point.
|
Establish connections between RoadContainers
Until now, users have not been able to make connections between two different RoadContainers with the interactive tool (and doing so manually with paths would create unexpected artifacts). In this branch, we first start to allow for connections. This is a stepping stone to fully support generalize custom prefab scene creation while retaining traffic AI guides (RoadLanes).
Edited at time of being review-ready:
Not yet implemented: