Hi!
I would like to make a 2D classic vector like game with only lines representing the level borders.
My question is:
What is the easiest way to make such levels?
Is there a way to draw such lines direcly in unity automatically with an edge collider attached?
Is there maybe an asset for this?
A good example for this is gravitar
I suggest using the line renderer component and edge colliders.
You could make a script that executes during update so you can build the level in the editor.
You could make the script draw a line from its game object and lead to another game object, which in turns leads to antoher and another, etc…
It’s a cool idea, I might give this a go myself one day.
Unfortunately it does not work for me. I played around with it for kind a while now.
What makes me suspicious is the fact that in your screenshot there are 3 instances of vertex.
The target of vertex is vertex(1).
I tried this configuration besides of many others but no luck.
Ok I purchased the vectrosity package but no luck with the collider in scene mode.
I turned on the “Collider” in the Vector Object 2D (script) as described in the manual to activate the collider on the lines but it does not work. I am using the 2D Space in unity as also described in the manual.
Using a script to draw points makes no sense to me because I want to see what I am drawing.
I am a little bit disapointed to say the least.
What do you mean by that? I added a line. Enabled Collider and Saw the collider was applied to it.
Click on Edit collider to see the collider in scene space .
What else are expecting, Please clarify.
After some tries I got it to work.
I don´t know why , but when I added a new scene it suddenly worked.
Before I could not manage the edge collider to add or update points.
What I am really missing badly is the ability to add points between two existing points in the visual editor. I can only remove points but not add them.
I contacted the author but he said that this would be a feature of a quote “super-complex bloated drawing app” and he also claims that the visual editor is not meant to be used at all.
Funny statement, to say at least.