I somehow can follow why this is there, but when I click on a spline gameobject, i’d like to be in its edit mode. However, if that separation is necessary, then there should be a keyboard shortcut.
In order to edit a knot (why is it called knot, isn’t that an anchor?), you have to first click on each and every single one of them. That’s too many clicks:
The handles should all be visible and instantly modifiable.
Inserting a new knot is circumstantial. You can only insert new ones along the spline, but not outside.
So you have to click the insert tool first, then insert the knot along the spline, then move it outside. No idea yet how to snap that point when you move it.
Moving the start point is an arrow down. That’s confusing. It should be an arrow along the spline since all you can do with it is move the knot along the spline:
There’s the AddPointToEnd method. But for the user it’s irrelevant where the spline starts or where it ends. There should also be an AddPointToStart method. This also reflects in the UI:
Deleting should delete the closest knot at the press of a hotkey and mouse click. Not click, then hit the delete key and that over and over. That’s tedious, especially for longer splines.
Please add a triangulator utility class, e. g. used for the closed spline. Should consider the resolution of the curve. I tried with the Spline Square preset and a quick triangulator I took from the web:
It can come in very handy, e. g. using terrain projection:
Basically one could select multiple houses as settlement, align their height, create a closed spline around their bounds with height of their lowest vertices, create a triangulated mesh (invisible, on a dedicated layer) as the “floor” and drag that settlement around while the terrain aligns properly to the mesh. Not just the houses, but the spline area around them. It’s a special use case, but a valid one nonetheless. But it starts with the triangulation.
That could also be cool for intersections. IIRC they want to focus on a good editor UX though so that the core functionality (creating splines) is really solid before adding more utilities though, which IMO seems like a good way to go. Otherwise I agree with all your suggestions, except that those might be a good fit for a community/open-source spline tool based on Unity’s splines
Hey! This thread is awesome, thanks! I’m super busy for the next few days, but I’ll try to find time for good detailed answers. Thanks for all the info!
Yup, this gets much better in the updated Unity alpha - these “Edit Modes” are a more clear toggle.
Yup, we also are adding a generic “Enter/Exit Editing” keyboard shortcut.
So, both yes and kinda. We took the path of “treat all these sub-objects exactly like GameObjects, enabling anyone to use all the same selection/manipulation/snapping/etc tools”. That means interacting with12 anchors/knots is the same as 12 cubes.
However, we also prototyped a “Direct Manipulation” method, and hope to add this in the next version - essentially a way to click-drag on a thing, and immediately (“directly”) manipulate it, skipping all those annoying clicks.
That will also become (not sure when) a method available for GameObject manipulation, too!
This was what the devs felt made sense when beginning work. Still TBD final naming.
Just like you would for GameObjects
CTRL will snap to increments
CTRL+SHIFT will snap to surfaces (I believe this currently requires a collider, though)
V will snap to vertices
Another item we’re working on for the next version - taking it a step further into branching and merging.
Do you mean:
Hover on the knot
Hit hotkey
That knot is deleted
I think I’m misunderstanding?
What sort of “restart” would you expect? For example, would it become a straight line with two points in space … or delete all … not sure what “restart” would be?
You could always use default if you just want an uninitialized knot. Otherwise I suppose we could omit rotation?
As mentioned above, yes this is for DOTS compatibility but also because we are using the Unity.Math package rather than UnityEngine.Mathf.
That would be cool, I agree. Possibly something we could do with ProBuilder integration, as there is already a triangulation library implemented there.
Yeah, we’ll need to add a Remove method. I believe we even have a task in the backlog for the Spline class to implement IList, which would make this much easier to work with in custom editors.