Path Creator (free unity tool)
Вставка
- Опубліковано 2 лип 2024
- This is a little tool I made to help with creating paths in Unity.
You can get it from the asset store: assetstore.unity.com/packages...
Or from github (updated more frequently): github.com/SebLague/Path-Creator
As a starting point, I used the path editor from my old tutorial series, which you can watch here: • [Unity] 2D Curve Edito...
If you'd like to support me in creating more free stuff (tools, tutorials, etc.), you can do so here:
/ sebastianlague
Hello, sorry for the lack of tutorials recently! I'll be working on some new videos soon...
I hope some of you find this little tool useful. Let me know if you have any issues with it, or if there are any features you'd like to see :)
EDIT: Now available on the Unity Asset Store: assetstore.unity.com/packages/tools/utilities/b-zier-path-creator-136082
Hi Sebastian, your videos are just amazing. A video suggestion, to implement the jump animation and combat in the character creation series, this would help many people. Thanks for the content
Awesome tool, thank you very much! Just a suggestion : I think it would be better to have the global display settings on a separate window and not in the inspector.
Thank you again for this tool
I love your content, so straightforward and easy to comprehend. I would like to see a way to use this path editor with your 2D platform tutorials. For example, you have the moving platforms but how about being able to move them as an elevator, so you would give it instructions to move from point 2 to point 5 while easing the speed at start and finish. This is just an idea, keep up the great work man!
Great video! Add road junctions please!
Hi, it's grate tool!!
Can we change the mesh of road ?
Who in the right mind would give a Dislike on a video like this?
1. Free stuff
2. Open source
3. Great tool
4. A tutorial on how to use it
5. Clear and understandable (no heavy accent)
Like what the hell is wrong with people, SERIOUSLY!!?
Anyway, thanks for this dude, great video. Keep it up!
Those are probably missclicks
I'd make a response but that last time I tried to talk to a guy confused about Dislikes he ended up berating me in a public debate, belittling me around every point without remorse and throwing ad hominem between every sentence. Funnily enough the things he was calling me was fully applicable to him, so I just left the discussion so as to not waste anymore time on the fool.
The downvote rate is 0.5%. That's as low as it ever gets once you are past a couple hundred votes. Just treat them as statistical noise.
T33K3SS3LCH3N static noise, lol. So just as @TheGodCold said “misclicks” haha
Just Australian things.
Seb you're a mad lad. I drooled when you demoed the road tool. I want to use the vertex path for an ECS demo!
Haha thanks :P Sounds cool!
No joke this is one of the best tools I've seen on the Asset Store. Bravo, sir, Bravo....
But unfortunately, this works on unity 2018, I tried using unity 2019 it didn't work
@@krenstx2502 sad
@@krenstx2502 I'm using 2019.4.3f1 and it works fine.
@@krenstx2502 Works fine on 2020.3 too.
By the way, Thank you Mr Lague for the plugin. Very clear and simple to use. Efficient. it's an awesome job you've done here !
What about unity 2020 LTS?
This seems like a very useful tool, thanks for making it free.
I might look into pairing the road creation tool with the decal projection unity has built in to make roads directly in custom terrain meshes!
I watched your original vids on the path editor to learn how to write editing tools in Unity.
Brilliant.
Then I came across this - you've not only implemented pretty much everything I could want, but you released the source, for FREE!
Bless your cotton socks, young man!
Oh my! I just found out there's also a manual and examples included.
Good grief - I may even break my Golden Rule and head to Patreon!!!
I've only been playing around with unity for a week or so and was just starting to stretch beyond what included unity tools could let me easily do. I was imagining needing to write a incredibly stripped down and scuffed version of basically this tool and was dreading learning the editor APIs needed to do anything of the sort. Basically I'm trying to say that I'm so very impressed by this.
Thanks so much for writing this tool, sharing it for free, and making such a clear and succinct tutorial.
Dude this is awesome!!! I'm a noob who's building a racing gaming and after searching a while, found your tool on Unity Asset Store. Such a time saver.
I have been watching your tutorials for a while and wanted to look up how to use the Bézier Path Creator. To my surprise, you're the guy that developed it!
Thank you! :)
Having used some other free spline tools in the past... this looks extremely polished :)
Wow
@@hydreox1911 how did the project trun out without anyone helping you?
@@FireJojoBoy I just did a little bit of research and re-reading of the manual again and I got it working. It was much easier than I expected and the project was beautiful. I made a curvy track for a ball game for my school project. Got top marks on it. That was 2 years ago hehehehehe. I could maybe show the game if I have it still which I believe I do
@@hydreox1911 Hey that's awesome :)
You with your tutorial and The man who coded this is a legend 😊
honestly just did a project for school using the base of your 2d spline, switched it to 3d inc mesh generation and recreated most of the basics featuers from the sky-hook / zipline system from bioshock infinity. and now you've extended/polished your own tutorial. Can't wait to see the differences and the way that you coded it. thx again for all the tutorials.
Wow, I think, this is the best thing I've seen since working with Unity alltogether. Thank you, Sebastian, for this really great tool :) This brings my project to a whole new level, I'm absolutely stunned!
Excellent stuff, this is going to be super helpful for my next game! Thanks.
this is great. I was having trouble for a while making a 2D sprite work but I figured it out. If anyone else is having that problem, here's my solution: open up the pathfollower script and remove the line with transform.rotation. The sprite is being rotated into a position where it's invisible from a 2D camera.
Thank you!, I did it but then it stoped to look at the path. Did you find a solution where the axis that is actually looking into the path is the x axis?
Yeah but it needs to rotate still? Lmfao. That's a bandaid solution.
@@tiernanstevens117 After the transform.rotation in his script use: transform.Rotate(0, 90, 0); The y-axis is getting set to -90 then use Rotate to add 90 to the y.
Dear Sebastian, I'd like to send you a big THANK YOU from France, your tool is just awsome ! Very useful, very polished, usable in seconds and to top it all... it's FREE ! Hugs, love and much respect from Paris (now going to patreon to support you because you really, REALLY deserve it).
Great mind think alike!
You quietly deliver chunks of solid gold... Great work. Thanks!
So this dude is one of creators that fills assets store with great tools i can use for free, thanks you so much then, please forgive my tiny brain that can't make a single asset of my own.
Thank you so much, this solved a big problem for me. I also love that the scripts are nicely commented and
perfect for my weapon sway, I find myself coming to this channel every time I google something for unity, thanks Sebastian
You're a god! I looked for this, exactly this for 2 days now. Just a simple effectiv and usefull path tool without all that tweening stuff. I need to try this, thank you so much!
Great stuff, no longer do I need to manually place my road asset pieces and try to fix collider issues... thanks very much again bud.
As well as having some NPC's or moving assets move along a pre-defined path, amazing.
Thank you for this, you have saved me from a math nightmare, bless you!
I´m breaking my mind to make an object follow a path via script and you make such a wonderful tool!!! Thank you Sebastian are you too pure for this world!
In the end I understood how to move my character keeping it anchored to the Curve.
Thank you very much for the wonderful work you have done and shared with us.
A bit late do you have any tips on how to do that?
Awesome tool Sebastian, as always! I could really see this be used to create roller coasters.
I wanna ask how to use this asset? I am trying to use this for a project for school but it doesn't work for me. PLEASE HELP URGENT! HOW DO I MAKE IT WORK TO USE IT! I KNOW HOW TO DOWNLOAD IT BUT HOW DO I INSERT IT TO MAKE IT WORK! Thanks
@@hydreox1911 If you even bothered to read the docs then you would know.
@@WillDev DO not fear, as I have successfully worked it out 1 month ago. Please be more polite. I am a beginner to unity and to me the instruction wasn't clear. It was only for school purposes.
@@hydreox1911 im pretty sure putting caps lock and saying PLEASE HELP ITS URGENT HOW DO I MAKE IT WORK! Is not polite :/
@@WillDev I used please. This was urgent matter. Please reconsider what you say. There is nothing wrong with putting caps. My query was put best to politely ask people.
This is amazing. Thank you for doing this! Would love to see this with a "snap to terrain" feature tho. Especially in 3d world mode.
Not just the tool but also code is very precious, there are lots of things to learn there. For example I didnt know about that Editor tab ability. Thanks a lot!
The fact that this AMAZING tool is free let me to instantly subscribe!
You are doing SUCH a wonderful job!
Be blessed buddy!
Thank you, thank you, thank you! I've been trying to learn how to make games on Unity and started getting discouraged when the only options for me were a 75 dollar asset or to create my own, which involved all kinds of stuff I don't know well like constructors and creating my own meshes. This was a life saver!
Constructors and meshes are pretty simple to learn if you find the right tutorials
Excellent asset right here, exactly what I needed and for free as well. I've been wanting to make my own rollercoaster building game for a while and this will make that so much easier. No idea why it took me so long to come across this, but I'm very glad I found it!
if you didn't find it yet unity has a splines package now which would also be good to check out for your game as you can use it with your own gameobjects along the spline path
I can't express how grateful I am that you created such a useful tool and even made it free, thank you, sir, you are a legend.
Still a Great Plugin in 2023. I use it since 2021, it still make the job, and very simple, well made and easy to use. Thumbs up !
This is great and well polished you are the greatest. If anyone is having problems keeping the sprite from vanishing in 2D games use this code. May not be the most graceful method but worked for me.
Quaternion angle = selectedPath.path.GetRotationAtDistance(distanceTraveled);
angle.x = 0f;
angle.y = 0f;
transform.rotation = angle;
Where will we write the code
@@furkantemizer7113 in the update() part
Thank you so much man. I have tried many ways but this helped me.
I run into same problem. Just want to update. now anyone have same problem should use following code.
void Update()
{
if (pathCreator != null)
{
distanceTravelled += speed * Time.deltaTime;
transform.position = pathCreator.path.GetPointAtDistance(distanceTravelled, endOfPathInstruction);
//transform.rotation = pathCreator.path.GetRotationAtDistance(distanceTravelled, endOfPathInstruction);
Quaternion angle = pathCreator.path.GetRotationAtDistance(distanceTravelled);
angle.x = 0f;
angle.y = 0f;
transform.rotation = angle;
}
}
If you need ideas for future tutorials: Combining this with one of your terrain tutorials in order to place the road on the terrain and shape the terrain would be awesome. Thank you very much for this Path Creator, it's really appreciated! :-)
this is so helpful, I couldn't get it to work after downloading it from the asset store but after getting it from the github it worked immediately, and had all the features I needed for my tower defense game - thanks so much!
This helped me a lot, thank you so much. I cannot stress how much time I have wasted searching for this. I will keep an eye on your content, mby even patreon you.
Could you tell me where in the scripts I could edit the position of the control points? It would make life a lot easier if you could edit their positions exactly where you need them to be instead of trying to move the points by hand.
Very nice, As always) I know that you have already series about generating caves. Maybe you can do series about generating rooms and connect them via corriddord or ladders? Maybe it will be not a procedural mesh but with ready rooms and other stuff. Anyway your content always amazing)
Thanks for the suggestion, will think about it
@@SebastianLague, :) Good luck to you, always wait for your tutorials)
I've worked with Bezier curves before, but neeeever have I made anything as seemless looking as this!
It's really satisfying to see all the math work out, and all the subtle features just working.
So uh, good job
Great tool. Exactly what I was looking for. Thank you, Sebastian!
I would like to know if there is any way to put a collider (2D) on the edges of the road automatically, my idea is to use it as a race track and not have to do it manually track by tracks. Because also, my idea was to be able to generate tracks automatically and randomly. Any ideas for that too?
Did you find a solution?
@@antoniomangoni9719 no sorry, I didn't know how to do that and I quit haha
if anyone knows how to do it please show it
great stuff! thank you! I am really interested in learning about this more, specifically about how to generate path by adding points to a path on runtime. Any ideas on how to approach this?
Any luck on this? I want to make new paths at runtime, so it should be similar :)
@@remus-alexandrusimion3439 Any progress? I was thinking about animating it in runtime
@@Gutagi Hi, life happened and I didn't get to it, but it's still on my to-do list. If you manage to do anything in this direction before I do, please keep me posted. :)
Oh wow this is amazing, I wouldn't even know where to start to create something like this
Nice use of Bezier curves , would never have thought of such a creative use for them myself
That's awesome, thank you very much! A question regarding the license: Are we allowed to use the code in our own tools, credits to you will be provided of course.
Hi! When I try using the 2D mode my sprite flips all over the place, do you know how to fix it? Thanks!
What the heck Sebastian!!! you should be the head of Unity tools developers, not only that this is a great and very useful tool, but also the Blender Spirit of simplicity and practicality that you gave to it is just amazing.
I just want to say this is INCREDIBLY useful and intuitive. I set up an FF10 style cinematic camera system in about 10 seconds after watching this video!
Thank you so much for this ! Is there a way the speed of the object can be set to ease in ? so that it has a slow pull away and then accelerates to top speed
You should be able to do that in code. Figure out a function that will pass in the correct distance values over time. As a demonstration, try squaring the number you pass in. This will make it go faster and faster, so you will probably need something that enforces a max speed.
Start with a smaller speed value and increment it by time.deltatime(or some delta of choice) in each update before incrementing distanceTraveled, but clamp it to a max value of choice. Hope this helps. I haven't tested this though, just off the top of my head.
how do you get the road to collide with objects, also this is incredible. im creating a racing game and this saved me hours of headaches, thank you.
Same situation here. Turns out you just need to slap a MeshCollider onto the road.
Can't believe this is free, thank you so much for your work and amazing explanation.
I'm chuffed :) I expanded on the functionality to include a "cost/speed" value for each anchor point. When calculating the "progress along the path", this is taken into account, so you don't progress along all the segments at the same speed.
HERE IS THE CODE SHOWED IN THE TUTORIAL
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PathCreation;
public class EnemyAI : MonoBehaviour
{
public PathCreator pathCreator;
public float speed = 1;
public float distanceTraveled;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
distanceTraveled += speed * Time.deltaTime;
transform.position = pathCreator.path.GetPointAtDistance(distanceTraveled);
transform.rotation = pathCreator.path.GetRotationAtDistance(distanceTraveled);
}
}
What font, theme and colors do you have in visual studio code, it looks absolutely wonderful.
might be one of the dozens of "Monokai" themes floating around among the VS Code plugins.
Sadly I haven't found one yet that is a perfect match of the Monokai theme used by MonoDevelop which I find even better because of the colors it uses for syntax highlighting.
Spellbound at the elegance of this venture.. Exuberant!!
Download a few days ago the assest, It is incredible good. Thanks for letting him free. !
I find it odd as a blender user that unity doesn't have a path/curve system like this in place.
defka99 unity also doesn’t have csg and behaviour tree editor. I wonder how it became too popular
@@ic_6403 Sometimes doing things manually is fun
Agree. Unity doesn't have so many things i assumed it would when i started. Yet I find it's the only tool that's working for me, tried a few others like defold. If anyone has other suggestions, am all ears...
@@redchilli450 Unity is so strange. It makes some things so simple and has helper functions that would surprise you. But then it feels like it's missing some things entirely. Also some of the built-in functions are kinda buried and hard to find, or else inefficient(for example, transform.Translate). I'm in a love-hate relationship with Unity. XD
If this ever gets a downvote, I will personally hunt the person down and slap them in the face.
Edit: it’s been disliked. Unbelievable. I’m going to assume these people just missed the like button, because there is literally nothing about a free, well developed unity tool that can possibly be disliked.
Let's consider those people were just so excited by the Path Creator tool that their hands were shaking so hard they hit the dislike button instead of the like button by mistake. Also blurred vision might have happened a bit later :).
Excellent tool!
LOL
Almost 10% bothered to vote, thats something at least
VERY good. no fluff, just to the point utility. Amazing.
Excellent. Here it is, Oct, 4, 2020, and have just found your video, so I downloaded it, and am using it in Unity 2019.4.9f1, and the only thing I had to do, in order to view the splines in the scene view, is to enable the little viewing tool on the left side of the object, in the hierarchy. This looks to be a superb tool, for creating a path, for my racing game. THANKS MUCH for your work.
Any way to make branching paths? Excellent job by the way.
I sometimes get a "object reference not set to an instance of an object" error when adding the Path Creator script to the EmptyObject, anyone know why?
I've got the same issue if you figure out please tell me
Mind blowing, this is excellent stuff, i was actually doing this in opengl as an assignment for some university students recently, and i know it is a fair bit of work.
Wow! A complicated tool but you've made is so easy! Thank you!
I use Unity 2021, import your packages from store, create a GameObject then add Path Creator and nothing happens, nothing shows up.
NullReferenceException: Object reference not set to an instance of an object
I've got the same issue if you figure out please tell me
139 likes, 0 dislikes
never say that, someone will dislike because of your comment, lel.
Subbed in appreciation for this great time saving asset. Thanks Sebastian
Stunning tool and functionality, well done Sir!
This one is bugged to hell
Holy shit this is awesome. Ive been wanting to create a version of supercars (from the amiga). The cars etc are heavily in alpha stage but wanted to add a path like this to see how it fairs. Cant wait to try it out and port it over to javascript (eventually, as thats where I try to build all my simple games now). TIA for the hours you have saved me. And thanks for not just adding it to unity/unitystore (which I personally have only used once in my life)
Everything this guy makes is awesome and this is the best one yet!
Thanks so much for giving this useful and perfectly written source code freely. Great asset really.
This is a really nice tool! I'm sure it will be helpful in many people's projects
This is awesome. And absolutely perfect for a project I'm working on with a buddy. As a thanks, I'm heading over to your Patreon to contribute. Thanks, Sebastian.
Thanks man. Just used in the project. Really cool stuff.
That's really neat! I can think of several applications for this.
This is what I exactly want to know. Thank you for sharing this tool and tutorial!!
Oh my gosh. This looks amazing. I will give it a go right away.
Thank you for the great script and the tutorial.All of your work is the best of the best.Thank you!
Amazing job, I look out fot that kind of tool for ages, thanks a lot for giving that for free
Happy you like it :)
Seb, your work is amazing (as always!!) FYI it's not currently working on unity 2021 -works like a charm in previous versions ofc!
This is exactly what I was looking for, thank you so much!
just stumbled on this and this is exactly what i need. Thank you so much!
It's so incredible that you actually made it free 😄
This can be pretty useful for authored sword trails. Thank you!!
This tool is HUGE for me! Thank you!
This is amazing. Thanks for this! Super well done
I went through all of the spline tools on the Unity asset store...this one was the best. Great work.
Thank you so much for sharing! i'm a huge beginner so that im still watching over and over.. hope i can apply soon :)
what a fantastic tool! Thank you SO very much! It is exactly what I needed
Brother, This is beautiful work, Love it
Legend status...thank you Sebastian! You're a great inspiration :)
This tool is amazing and so easy to use
Really great tool, thank you for posting this!!
Good sir, thank you for making this amazing free tool. You really saved my ass with this, this is EXACTLY what I needed. Thank you!
Now I understand that he is way more better than me because I would created that tool for sale!
Excellent Asset thank you... I hope Unity adopts it in the main package list in future
You've done amazing job, Thank you so much!
God damn this is amazing. I was actually looking for something like this just yesterday, BOOM!!
Very good tools, i will use it in my next project!
Hey Sebastian, thx for the share man. This one will be very useful to me.
I implemented something similar some time ago based on some tutorials from catlikecoding ( btw he has some bombastic tutorials ).
Your version looks very polished thou!
Thx again.