I have a list of Vector3’s that are supposed to form a road using a spline system. Problem is they are in a list in a random sort of order and it’s impossible to order them so that they form the road with all of its intersections and stuff correctly. So what I want to do is create linear paths from what I can and overlap the roads where there should be intersections. I have an asset called Road Architect and it can create the intersections for me. I just don’t know how to make the paths from the randomly ordered list of Vector3s. Right now I’ve created a class that holds data about 2 Vector3s that should be connected as a curve. And I have a list of those. With 1 vector3 called nodeA and another called nodeB. I know the sequence that they connect in from the first to the last in each row. It goes like BAABABAB it starts with nodeB and nodeA then It goes to another nodeA and to a nodeB and it keeps going until there aren’t anymore nodeAs in the row. This is how the curves connect. B—A—A—B From A to B is 1 curve. A is the start node. B is the end node. B(End)----A(Start)A(Start)-----B(End) This is the sequence that it goes in. And it repeats A and B in that order until there are no more As in the row.
So all you have is scattered short splines which goes from A-B?
Perhaps you can start by organize them in a node graph connecting all ends which is close enough.
Some of the nodes may only go from one spline end to another, and other nodes makes junctions where more ends connects to the same point.
(To solve your assignment…)
I solved it.
But now I need help with something else. I have working scripts but they are slow. How could I make them faster? The slow part is the loops I think. It’s a terrain smoothing script. It works but it’s super slow.
Please open a new thread for a new issue. And show your code. Ensure to place numerous Debug.Log statements throughout your code to see how it’s executing
Please change the title Tag from “Help Wanted” To “Resolved” since you solved the original issue. Alos, for future purposes I would suggest that your title be a bit more descriptive. Titles like “I Need Help!!!” do two major counterproductive things. First, titles describe a problem at a glance so that those with insight into THAT area of Unity can assist. There is a higher likelihood that your problem will be addressed if those scrolling the Forums see “Spline Roads: Trouble retrieving variables form list” than “Help me please!”. And secondly, it causes issues for those behind you. These forum posts show up in google as top results in most cases as well as the internal search here. If someone else is having the same issue you’ve solved they won’t google “I need help” they will try to describe the issue.
Agreed. I even cover that in how to report your problem productively in the Unity3D forums:
I’m at the point now where I think posts like this should be deleted immediately so we don’t have to waste time with them because I’m kind of wanting to refuse to even respond to people who are this lazy with topic creation.
I think noobs should be given leeway, not about to go suggesting mods just go and ban people but the forums have been seriously abused lately and I have my suspicions that some of it is either bots or people who have ended up taking unity for classes for either school or university and have no idea what they’ve gotten into.
Before the OP potentially gets offended, no I’m not having a go at them in particular, this is just a pet hate of mine because it’s getting out of control, people who don’t even bother using code tags I’m ignoring entirely now, I’m not reading any of that. Please at least make your posts readable if you want to get decent responses, respect the time of ex-professionals, current professionals and long term users and they’ll respect you.