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!
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!
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.
@@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 !
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?
@@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.
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!
@@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
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.
Been a viewer of yours on and off for a few years. Imagine my surprise when I discovered you made a package which solves the exact problem I've been having. Very nice to finally 'collaborate' with you Sebastian!
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).
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
@@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.
@@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 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!
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!
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;
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; } }
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! :)
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.
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.
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.
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.
@ I want to create paths for clouds across the terrain and want them to move at different speeds along the paths, so that certain parts get more water from rain. The speed lerps between the speeds at the two anchor points it lies between. Also allows move cost for roads.
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 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
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.
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!
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
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!
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); } }
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.
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?
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!
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!
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! :-)
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.
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.
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)
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.
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?
@@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. :)
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.
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.
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!
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.
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
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.
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 saw people here wondered how to make 2d object follow path with correct rotation. I also had such problem. There is a decision i came up with: Delete his transform.rotation=.... and use this private void Rotate() { float t = distanceTravelled / pathCreator.path.length; Vector3 xDirection = pathCreator.path.GetDirection(t).normalized; // Y axis is 90 degrees away from the X axis Vector3 yDirection = Quaternion.Euler(0, 0, -90) * xDirection; // Z should stay facing forward for 2D objects Vector3 zDirection = Vector3.forward; // apply the rotation to this object transform.rotation = Quaternion.LookRotation(zDirection, yDirection); } Anyway thanks a lot for amazing tutorial
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
Fantastic tool! One suggestion would be to cache the Vector3 variables in the core code and reuse them so that in the Update calls to get point at distance garbage collection spikes won't be generated. If used abundantly the frame rate will stutter. Otherwise, it's great!
After a little dive in the Core code I see it's not Vector3 that is being allocated but the "TimeOnPathData." If this is allocated early and then just re-used it will stop the GC's.
anyone who asks about no road mesh file in project. don't worry, the road mesh it self will remain there when you build your project. even you can add meshCollider to it. hope this help. cheers.
I was breaking my mind trying to build something like it, now you've made it for me. Thank you very much, I have a Idea of a little script to complement yours in order to avoid making a new class every time you need to move a object along the path.
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, this tool (adjusted to my specific needs) has been a joy to work with! Just a mention for someone who may come across it and don't know why it happens. When changing the PathSpace from XYZ to XZ (similar for XY) and both boundsSize.y == 0 (all points already lies on a flat plane) and boundsSize.x == 0 (all points actually lie on a line on the z-axis) , the UpdateToNewPathSpace method makes x zero, rather than making y zero. I fixed it with altering the assign statement slightly (testing for == boundsSize.y): float x = (minBoundsSize == boundsSize.y) ? points[i].x : points[i].y; float z = (minBoundsSize == boundsSize.y) ? points[i].z : points[i].y;
Really well written tool, makes working with Cinemachine Paths obsolete for me - way easier to handle! I just did a pull request and added the "BezierPathJoiner" component, which allows for smoothly stiching together multiple paths into one with a single button click. It needs to be merged tho :)
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 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.
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!
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 :)
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 !
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.
Been a viewer of yours on and off for a few years. Imagine my surprise when I discovered you made a package which solves the exact problem I've been having. Very nice to finally 'collaborate' with you Sebastian!
You with your tutorial and The man who coded this is a legend 😊
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!
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 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!
Yes it wokrs! Thanks!
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
Thanks, Does this not allow us to edit the points at run time from the player window? ALso does it work with mobile touch/raycast?
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;
}
}
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! :)
Thank you for this, you have saved me from a math nightmare, bless you!
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.
Excellent stuff, this is going to be super helpful for my next game! Thanks.
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.
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.
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.
This sounds useful. What is your use case for this? Different terrain the object encounters?
@ I want to create paths for clouds across the terrain and want them to move at different speeds along the paths, so that certain parts get more water from rain. The speed lerps between the speeds at the two anchor points it lies between.
Also allows move cost for roads.
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.
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 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
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?
Thank you so much, this solved a big problem for me. I also love that the scripts are nicely commented and
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!
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
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!
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);
}
}
perfect for my weapon sway, I find myself coming to this channel every time I google something for unity, thanks Sebastian
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.
You quietly deliver chunks of solid gold... Great work. Thanks!
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
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!
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
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! :-)
The fact that this AMAZING tool is free let me to instantly subscribe!
You are doing SUCH a wonderful job!
Be blessed buddy!
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.
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.
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.
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.
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)
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.
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. :)
Is there anybody in 2021 ?.Watching this
Thanks for the tutorial .It helped me
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.
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.
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!
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.
Oh wow this is amazing, I wouldn't even know where to start to create something like this
Any way to make branching paths? Excellent job by the way.
Spellbound at the elegance of this venture.. Exuberant!!
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
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.
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
I saw people here wondered how to make 2d object follow path with correct rotation. I also had such problem. There is a decision i came up with:
Delete his transform.rotation=.... and use this
private void Rotate()
{
float t = distanceTravelled / pathCreator.path.length;
Vector3 xDirection = pathCreator.path.GetDirection(t).normalized;
// Y axis is 90 degrees away from the X axis
Vector3 yDirection = Quaternion.Euler(0, 0, -90) * xDirection;
// Z should stay facing forward for 2D objects
Vector3 zDirection = Vector3.forward;
// apply the rotation to this object
transform.rotation = Quaternion.LookRotation(zDirection, yDirection);
}
Anyway thanks a lot for amazing tutorial
139 likes, 0 dislikes
never say that, someone will dislike because of your comment, lel.
Nice but what the difference between this asset and unity spline ? 🤔 Which one is better performance side ?
This one is bugged to hell
Download a few days ago the assest, It is incredible good. Thanks for letting him free. !
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
Stunning tool and functionality, well done Sir!
Subbed in appreciation for this great time saving asset. Thanks Sebastian
Nice use of Bezier curves , would never have thought of such a creative use for them myself
Everything this guy makes is awesome and this is the best one yet!
VERY good. no fluff, just to the point utility. Amazing.
can't believe this thing is free on asset store... amazing tool
Can't believe this is free, thank you so much for your work and amazing explanation.
this is probably the best unity tutorial video ever ? or something ?
Fantastic tool!
One suggestion would be to cache the Vector3 variables in the core code and reuse them so that in the Update calls to get point at distance garbage collection spikes won't be generated. If used abundantly the frame rate will stutter.
Otherwise, it's great!
After a little dive in the Core code I see it's not Vector3 that is being allocated but the "TimeOnPathData." If this is allocated early and then just re-used it will stop the GC's.
This is a really nice tool! I'm sure it will be helpful in many people's projects
Thanks so much for giving this useful and perfectly written source code freely. Great asset really.
Thank you so much for sharing! i'm a huge beginner so that im still watching over and over.. hope i can apply soon :)
anyone who asks about no road mesh file in project. don't worry, the road mesh it self will remain there when you build your project. even you can add meshCollider to it. hope this help. cheers.
This comment helped me a year after you wrote it, thanks!
This is what I exactly want to know. Thank you for sharing this tool and tutorial!!
Great tool. Exactly what I was looking for. Thank you, Sebastian!
The only thing about this tool that puzzles me is that it is free. Looks so professional!
Wow! A complicated tool but you've made is so easy! 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 :)
Excellent Asset thank you... I hope Unity adopts it in the main package list in future
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 Unity Tool is SUPER usefull. I will design a rollercoaster 3D model and then make a rollercoaster using this tool. Thanks I love it! :D
just stumbled on this and this is exactly what i need. Thank you so much!
I was breaking my mind trying to build something like it, now you've made it for me.
Thank you very much, I have a Idea of a little script to complement yours in order to avoid making a new class every time you need to move a object along the path.
I'm discovering your work and it may save my team school project ty
I went through all of the spline tools on the Unity asset store...this one was the best. Great work.
Thank you for the great script and the tutorial.All of your work is the best of the best.Thank you!
This plugin needs an inspector list of all the Bezier point handles so you can manually edit the position values of each handle.
Thank u so much, I needed to create an enemy AI to follow a path for a car game and this just helped so much.
Thanks again :)
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.
Oh my gosh. This looks amazing. I will give it a go right away.
Thanks, this tool (adjusted to my specific needs) has been a joy to work with!
Just a mention for someone who may come across it and don't know why it happens. When changing the PathSpace from XYZ to XZ (similar for XY) and both boundsSize.y == 0 (all points already lies on a flat plane) and boundsSize.x == 0 (all points actually lie on a line on the z-axis) , the UpdateToNewPathSpace method makes x zero, rather than making y zero. I fixed it with altering the assign statement slightly (testing for == boundsSize.y):
float x = (minBoundsSize == boundsSize.y) ? points[i].x : points[i].y;
float z = (minBoundsSize == boundsSize.y) ? points[i].z : points[i].y;
This tool is amazing and so easy to use
Brother, This is beautiful work, Love it
Really well written tool, makes working with Cinemachine Paths obsolete for me - way easier to handle!
I just did a pull request and added the "BezierPathJoiner" component, which allows for smoothly stiching together multiple paths into one with a single button click. It needs to be merged tho :)
Thanks for this! needed it for proc gen
I downloaded the asset and the BezierPathJoiner is not included. Am i doing something wrong?