Тёмный

Splines are Awesome!!! 

Code Monkey
Подписаться 530 тыс.
Просмотров 147 тыс.
50% 1

Let's make some smooth shapes using Splines Bezier Curves!
✅ Get the Project files and Utilities at unitycodemonkey.com/video.php...
🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses
👍 Learn to make awesome games step-by-step from start to finish.
Animation Curves are Awesome!
• How to use Unity Anima...
How to make Awesome Effects with Meshes in Unity!
• How to make a Mesh in ...
🌍 Get Code Monkey on Steam!
👍 Interactive Tutorials, Complete Games and More!
✅ store.steampowered.com/app/12...
If you have any questions post them in the comments and I'll do my best to answer them.
🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
See you next time!
📍 Support on Patreon / unitycodemonkey
🤖 Join the Community Discord / discord
📦 Grab the Game Bundle at unitycodemonkey.com/gameBundl...
📝 Get the Code Monkey Utilities at unitycodemonkey.com/utils.php
#unitytutorial #unity3d #unity2d
--------------------------------------------------------------------
Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.
I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
You can see my games at www.endlessloopstudios.com
--------------------------------------------------------------------
- Website: unitycodemonkey.com/
- Twitter: / unitycodemonkey
- Facebook: / unitycodemonkey

Опубликовано:

 

10 дек 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 207   
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
🌐 Have you found the videos Helpful and Valuable? ❤️ Get my Courses unitycodemonkey.com/courses or Support on Patreon www.patreon.com/unitycodemonkey
@sathyanarayanntiruchigurun9320
@sathyanarayanntiruchigurun9320 3 года назад
Great video
@KizmoBG
@KizmoBG 3 года назад
amazing as always, thank you very much!
@Shadowbirth1
@Shadowbirth1 3 года назад
Hello code monkey is the course free
@erichrcl
@erichrcl 3 года назад
Hello! I just signed up to your site unitycodemokey.com and I am trying to validate my account after receiving your "Code Monkey Account Activation" email with the validation link. Whenever I click on the link, a Code Monkey page opens up showing the message "Invalid validate link.". I even tried clicking on the "Resende Validation Email" located on the top of such page, but the same thing keeps happening. How can I have my account validated then? Thanks in advance.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
@@erichrcl Wait a bit then click on the last email you receive, check your spam folder.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
💬 Do you need a nice smooth shape for a road/orbit/patrol/anim/path? Splines to the rescue!
@timilehinafolabi1757
@timilehinafolabi1757 3 года назад
Exactly what I'm trying to do for a project .I'm trying to make a rider clone with AI riders
@Unknown_Programmer
@Unknown_Programmer 3 года назад
Is there anyway to make a 3d rope with physics and collision
@QvsTheWorld
@QvsTheWorld 3 года назад
Your ability to distil complex topic in a way that make them feel simple is quite impressive. This channel is quickly becoming one of my favorites.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Thanks!
@akinat0
@akinat0 3 года назад
Man, it absolutely awesome! It’s the most easiest quadratic interpolation explanation I’ve ever heard, thank you!
@iancherabier5920
@iancherabier5920 9 месяцев назад
Probably one of the best videos I've seen on Bezier Curves, really clear! Thanks a lot! :)
@Bred0nSch00lV2
@Bred0nSch00lV2 3 года назад
Reticulating splines. This brings back Sims 2 memories. 😄
@ganaraminukshuk0
@ganaraminukshuk0 3 года назад
I only ever heard of that phrase from Simcity 4.
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
I remember playing sims city 4, o was to young to remember stuff like that from it
@yawnyawning
@yawnyawning 3 года назад
The internet shows me lots and lots of genius in the world, and you definitely one of those geniuses!
@kotzikuche7883
@kotzikuche7883 3 года назад
Was planning to program a race game in the future. This will surely help, thanks!
@bladescreed
@bladescreed 3 года назад
Beautifully done tutorial! Easily explains how interpolation works and how you can expand on it!
@SaSeshen
@SaSeshen 3 года назад
But for real that is some ADVANCED math that could easily be portrayed in matrices or other similarly complex calculus! He explained simply enough that I am almost certain a child could understand especially with the visual rendering!
@Sir_Robin_of_Camelot
@Sir_Robin_of_Camelot 2 года назад
Sped up key stroke sounds are very satisfying
@sathyanarayanntiruchigurun9320
@sathyanarayanntiruchigurun9320 3 года назад
Great video keep up the good work man
@Maxolib
@Maxolib 3 года назад
Math is absolutely important!! Thanks for the good video.
@aaronperron
@aaronperron 2 года назад
so powerful, yet so simple
@page0809
@page0809 3 года назад
This is cool tool!! Thnx man!
@gargaroots
@gargaroots 2 года назад
Mind blown, seriously... You're definitely Brackeys 2.0
@TheNei
@TheNei 3 года назад
Great tutorial! Thanks🥰😍
@LukeAps
@LukeAps 3 года назад
Thanks for a pleasant math tutorial CM. Seeing AB_BC brought back nightmares of trigonometry. But you know, it was good. I liked it. Always missed maths, and I'm a programmer too hahah.
@NoobJang
@NoobJang Год назад
i always missed maths because of how maths is taught and the whole education system running have had a pretty rough high school life, made me lose all interests in learning, including maths. Now watching this video, it actually gets kind of fun Just if they actually teach stuffs like this man, school would have been so much fun
@Ne0mega
@Ne0mega 3 года назад
Best spline/bezier curve tutorial I have ever seen.
@t90gamemakervietnam8
@t90gamemakervietnam8 9 месяцев назад
Thanks for your best tutorial !
@Trooperos90
@Trooperos90 2 года назад
This is just beautiful
@lordfluffy9438
@lordfluffy9438 3 года назад
Great explanation! Thanks!
@dumbguy1073
@dumbguy1073 3 года назад
Excellent video sir! Explained it so well
@100drips
@100drips 2 года назад
thank you. very well explained.
@sidbell929
@sidbell929 3 года назад
That's Brilliant!
@pkappa99
@pkappa99 Год назад
You always manage to explain complex and useful things to the Unity Community, thank you!
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
Thanks for the kind words! I'm glad you found the videos helpful!
@arcday4281
@arcday4281 3 года назад
Very useful !
@StellarMirage
@StellarMirage 2 года назад
Thanks I needed it very much because I am creating an open world game just like simcity and skylines and being a solo developer I had to rely on third party codes which are not very customizable and also I needed a create a road of my own using this splines thanks very much.
@meysamameri2198
@meysamameri2198 3 года назад
it's a Great tutorial , thanks man
@pankajKumar-xj2do
@pankajKumar-xj2do 2 года назад
fantastic, great tutorial
@ThirteeNov
@ThirteeNov 3 года назад
You're are the brilliant Unity master.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Thanks!
@oscarmelchorgalan3092
@oscarmelchorgalan3092 3 месяца назад
Fantastic! Thanks!
@yourgamedev7248
@yourgamedev7248 3 года назад
Your videos are wholesome
@meowsqueak
@meowsqueak 3 года назад
Thank you, great video - it really helps to visualise the maths behind the spline. One thing - should your QuadraticLerp and CubicLerp functions be using the data member 'interpolateAmount' directly? I think it makes more sense for them to use the parameter 't' instead. The end result in this example is not affected though, but it will cause problems if these functions are used from other places.
@konstantinpavlov7100
@konstantinpavlov7100 3 года назад
Thank you 😌
@ddxdPL
@ddxdPL 3 года назад
Woow nice!
@SaSeshen
@SaSeshen 3 года назад
I legitimately have never found mathematical graphical interpretation or interpolation nearly as impressive or exciting as I have than in this video. If this is how I was taught Algebra and Calculus in school I would literally have pursued a career in mathematics or programming 12 years ago instead of enlisting.
@NoobJang
@NoobJang Год назад
this is beauty
@dragon8053
@dragon8053 3 года назад
really nice
@homemacai
@homemacai 3 года назад
Nice!
@flyingjudgement
@flyingjudgement 2 года назад
Nice This is great for city walls !
@CodeMonkeyUnity
@CodeMonkeyUnity 2 года назад
Yup! Great for making a freeform castle
@castlecodersltd
@castlecodersltd Год назад
Great video
@duyha2454
@duyha2454 Год назад
Thank you
@mrvastayan
@mrvastayan Год назад
You’re a genius
@elmehdibelyasmine942
@elmehdibelyasmine942 Год назад
Thank you for your tutorial and files. However, there is a possibility to make all normal direction more vertical ? for example, people walking on stairs.
@shivamprajapati6839
@shivamprajapati6839 3 года назад
Its beautifully explained! By the way if you can make videos on saving and loading of games 😅
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Yup I covered saving and loading here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-6uMFEM-napE.html
@safwatahmad7672
@safwatahmad7672 Год назад
ThanQ
@rflx3608
@rflx3608 3 года назад
you can make evenly spaced distance on curves //this is placed on update() if (MakeCurve == true{ MakeCurve = false; for (float t = 0; t 1 ){ // add vector position on list PrevPosition = EnemyPos; } Progression += 0.0001f; } if (Progression >= 1){ Progression = 0; MakeCurve == true; // or just go to the next route of bezier curve } i did thiis last week and it took me 3 days to it so.... im just sharingg
@Zyniara
@Zyniara 2 года назад
Even though this isnt relevant to me, its appreciated that you threw in some extra stuff for people reading!
@TalhaRiaz197
@TalhaRiaz197 3 года назад
thanks
@rubencrespo9699
@rubencrespo9699 3 года назад
awesome tutorial....
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
I'm glad you liked it! Thanks!
@AnimilesYT
@AnimilesYT 3 года назад
This could've saved me days if I had this a year or two ago xD
@netrob
@netrob 3 года назад
You are Awesome!!!
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Thanks!
@RealNekoGamer
@RealNekoGamer 3 года назад
Really good solution! However, I'm having issue with the SplinesDone script trying to use negative indices for anchors and resulting in runtime errors.
@lozD83
@lozD83 3 года назад
10:20 Driver: "I'm a middle of the road kind of guy"
@Sogeshing
@Sogeshing Год назад
hey good content thank you again! I got a question, do you recommend any kind of books or content for mathematics/physics that apply to video game development?
@Astorec
@Astorec 3 года назад
What would be a good way to make this a Consistent speed? Trying to make a homing attack system and it's a bit too fast when you are further away haha
@MaximumJoy
@MaximumJoy 3 года назад
Reminds me of tweening in the Flash days
@_OBABICH_
@_OBABICH_ Год назад
thx
@nowherefool5869
@nowherefool5869 11 месяцев назад
do you have a tutorial how to wrap a spline to a spherical surface (ie : like roads on a spherical planet)
@SamuelAdomYG
@SamuelAdomYG 3 года назад
Hello Code Monkey. I first and foremost wanna let you know you are the best. I have actually never come across a fellow coder who can code in such a mind blowing way. I think you are gifted with this. God bless and keep up the good work. I have one request though, and that is if you can teach how to about 2D ladders. i.e. to make a player climb up and down a ladder. Cheers
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Thanks! That's going to depend quite a bit on your design, is it top down? Sidescroller? One simple way is to do a Physics2D.OverlapBox right on top of the player and see if the player is on top of a ladder, if so enable up and down motion.
@SamuelAdomYG
@SamuelAdomYG 3 года назад
@@CodeMonkeyUnity Wow it worked. Its a somewhat a mix of it. I am using Cinemachine 2d camera to follow the player around. Its more or less a bit like the classic jetpack game just that not all the level is captured in the camera, hope u get what I mean. I am quite new to Unity so your this method didnt cross my mind earlier but it works. Thanks a lot Bro. Keep up the great work. :)
@showgame0179
@showgame0179 2 года назад
How I can rotate a 2d object around player?
@element1192
@element1192 Год назад
Congrats, you coded the photoshop pen tool
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
More importantly I learned how the Pen tool works, very useful to know the math behind it and know that it's not magic.
@ronin6158
@ronin6158 3 года назад
How would you make an object on the track draggable with mouse?
@Andervall
@Andervall 3 года назад
Lovely video! Really showed how easy it can be do to something that seams more complex. Question: In your project files you use MeshUtils to Create and Add Line points and Line meshes, but MeshUtils does not exist in the current context, is this a code file you wrote on your own or is my Unity missing something? EDIT: Found it, though now I can't get the Spline Done example to work due to the menu for adding and removing anchors not working. It states that the index it out of range. Is there something more I need to get the Spline Done example to work?
@codingsloth5256
@codingsloth5256 3 года назад
where di u find it ? :))
@arthurvanschravendijk4111
@arthurvanschravendijk4111 3 года назад
Did you ever find the solution for the index out of range error?
@arthurvanschravendijk4111
@arthurvanschravendijk4111 3 года назад
@@codingsloth5256 It's in _-> stuff -> Videos->
@Andervall
@Andervall 3 года назад
@@arthurvanschravendijk4111 No sorry, I don't think I solved this one. :(
@arthurvanschravendijk4111
@arthurvanschravendijk4111 3 года назад
I eventually solved it by adding some code that checks if there are any anchors in the list and if not it creates one without first executing the points functions. The error came from no anchors being in the list but the add anchor function tries to use the index of the last anchor
@sahilsharma2867
@sahilsharma2867 3 года назад
Hello sir, huge fan Can I ask something Pls make "Journey of the Priarie king" with unity,pls pls pls
@JustBitsAndPieces
@JustBitsAndPieces 3 года назад
Monkey can you do a tutorial on how to play with someone through bluetooth , or on same wifi ? a racing game maybe? or fighting game that would be awesome
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
Unity has this built in, it’s called Mirror Networking and you have to get it from the package manager. There are videos about it
@kodaxmax
@kodaxmax 11 месяцев назад
just gotta lerp the lerped lerp. XD
@hogoromootsutsuki4079
@hogoromootsutsuki4079 Год назад
welp, don't really WANT to do this, but i need spline stuff for track and road generation for my game. so, need to learn non-linear lerping
@shinronitgaming486
@shinronitgaming486 3 года назад
but the car would crash if something comes in the way is there any way to dodge them?
@freezinfire
@freezinfire 3 года назад
Sir, can you do a breakdown video of minecraft, and how its mechanics work?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Remaking Minecraft would be an interesting project that I'd like to do at some point!
@PauloSamurai
@PauloSamurai 3 года назад
Why have you replaced Update function on testing script?
@vlla9483
@vlla9483 3 года назад
So this is what i did on papers. Wow
@SaSeshen
@SaSeshen 3 года назад
RIGHT?!?!?!?!
@ganaraminukshuk0
@ganaraminukshuk0 3 года назад
One thing worth considering is how many "steps" in that interpolation process you want; so if you only have t = 0f, 0.25f, 0.5f, 0.75f, and 1f (for four sub-segments) you'd have a really chunky curve. At the other extreme, you'll have so many steps that the engine will be rendering unnecessary triangles, so somewhere between those two extremes is the sweet spot, depending on how low-poly or smooth you want your curves to be. I also dreaded the day of having to animate cars at an intersection and I considered foregoing that animation process altogether and have cars teleport across, but now there's no reason to (because doing so is quite easy).
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Yup, if you were to build an entire city with this system, like in Cities: Skylines, you would need to be very careful in deciding how many vertices to use for each road.
@gower1973
@gower1973 3 года назад
What there is no spline system in the Unity api, you have to write your own? But its such a useful thing to have splines and curves
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
I remember seeing somewhere that they were going to add it, maybe its in version 2020?
@orlandoviolencestudio8990
@orlandoviolencestudio8990 2 года назад
How to set up the road sprit?
@watercat1248
@watercat1248 8 месяцев назад
i need some for off Splines system for my game but i wand i system like this that im able to animated in my game the player have cable hands so it's important for my to find some way make cylinder system with mash that able to check the shape off this in real time
@aaronperron
@aaronperron 2 года назад
How can we move along the spline with physics? like a roller-coaster affected by force and gravity.
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS 2 года назад
I’m trying to do the same thing, My plan was to make my game get the Y position of the train, the lower the Y position, the faster the speed that the train moves to each spline point, I’ll make it update every frame but my problem is I don’t know how to code and I’m trying to do everything using Bolt
@ko-games7768
@ko-games7768 2 года назад
Can I make a more detailed video on this topic?
@francescodasilva117
@francescodasilva117 2 года назад
Hi, great video! Is there a way to make the ABCD point go slower? Thanks!
@CodeMonkeyUnity
@CodeMonkeyUnity 2 года назад
The "points" dont move by themselves, you query the class to get a specific position, it's up to you how you handle that position request
@Riodragon1
@Riodragon1 2 года назад
easy tween ... poggg
@qsamjabareen775
@qsamjabareen775 3 года назад
thank u for help can u make a dev react to cyberpunk 2077 it will give u a little boost too since its trending TIA
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
I have been playing the game and I'm planning to do a video recreating some systems from it so stay tuned!
@lee1davis1
@lee1davis1 3 года назад
I have a thousand questions...but for starters, you are using time of one second to move between points, but if the distance from one point to another is greater, the car appears to move faster. How do I set a speed for the car regardless of distance?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
You need to calculate the unit distance in the spline. I did that in the expanded version of the Spline class that is included in the project files you can download
@lee1davis1
@lee1davis1 3 года назад
Th thanks. I'll check it out.
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
Please help, I don’t understand how to make the car move, I have like 10 cars, one on each spline section, how do you make one car? I tried making it so my game gets the time and then rounds it and then on every frame, it gets the rounded time and if it is 1, it sets the first spline section car to active, then if it’s 2, it sets the second one to active and also deactivates the one before it, I tried doing this but there were lots of problems like for some reason my car would start to get off-sync with the rounded time somehow, the car would get to the end of the track sections and then for like 4 or 5 frames, the car would appear at the beginning of that spline section and then suddenly appear on the next spline section, it would start off smooth and then mess it’s self up, also My game requires there to be 1 spline section at the start and then the player can add more and move then around but I don’t know how to reframe something that isn’t in the game at the start, also I’m using visual scripting
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
I made a game that has 1 of these splines, a roller coaster car I kade in blender, and an FPS counter and thats it, for some reason it only runs in 18 FPS on my iPad
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
And 30 FPS on my iPhone xs max, and my ipad is the ipad 6
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
Look in the profiler to see what is taking so long, could be many different things
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
Ok, thank you for replying
@Nervniyak
@Nervniyak 3 года назад
Can you explain how did you apply the road sprite? How did you manage to get middle lane be dashed this way
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
It's just a texture with 2 solid yellow lines on the side and a dash in the middle stretched out depending on the spline size
@Nervniyak
@Nervniyak 3 года назад
@@CodeMonkeyUnity Oh, could you explain the dash stretching a bit more in detail?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
@@Nervniyak You just change the textureScale on the material
@no-trick-pony
@no-trick-pony 3 года назад
hm.. but doesn't the way you interpolate between points by time make the object (i.e. car) go faster and slower depending how far apart the points are?
@Dxpress_
@Dxpress_ 3 года назад
You might be able to solve this by first getting the distance between two points and factoring that into the interpolation amount. Smaller distance = faster interpolation, larger distance = slower interpolation.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Yes, you need to add some extra logic to make it move based on units. I added that extra logic in the final Spline class that is included in the project files.
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
Can you please do a video on how to use the native splines that were added to the beta version of Unity 2022, they are in the package manager and they are called Splines 2.0, also can you make a video about how to make something move across a spline using gravity like a roller coaster car would, Like where it goes fast and then slow over hills and stuff using gravity?
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
Yeah I would like to explore the built-in splines package, haven't used it yet, just need to find the time
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Год назад
Ok, thank you so much. I tried using it to make a game for phones but for some reason every time I try to build a game in Xcode that was made in Unity 2023, it keeps saying Build Failed, I don’t understand why
@phosphorus8691
@phosphorus8691 2 года назад
Hey if you guys want to upgrade the Spline Follower script to use a curve to determine the speed: Add : public AnimationCurve speedCurve; Modify: moveAmount = (moveAmount + (Time.deltaTime * (speed * speedCurve.Evaluate(moveAmount)))) % maxMoveAmount; ;^}
@CodeMonkeyUnity
@CodeMonkeyUnity 2 года назад
That's a good addition, animation curves are awesome!
@phosphorus8691
@phosphorus8691 2 года назад
@@CodeMonkeyUnity Indeed, I use animation curves for just about everything lol
@phosphorus8691
@phosphorus8691 2 года назад
Also, to fix the null reference error for AddAnchor() Here is what worked for me. public void AddAnchor() { if (anchorList == null) anchorList = new(); else { if (anchorList.Count > 0) { Anchor lastAnchor = anchorList[anchorList.Count - 1]; anchorList.Add(new Anchor { position = lastAnchor.position + new Vector3(1, 1, 0), handleAPosition = lastAnchor.handleAPosition + new Vector3(1, 1, 0), handleBPosition = lastAnchor.handleBPosition + new Vector3(1, 1, 0), }); } else { anchorList.Add(new Anchor { position = Vector3.zero, handleAPosition = new Vector3(0, 0, 1), handleBPosition = new Vector3(0, 0, -1), }); } } }
@anonymoussloth6687
@anonymoussloth6687 3 года назад
I am trying to make a 2d spline road where the player controls the car. The problem is, I want the player to die when he hits either edge of the road. How would I add colliders to achieve this since I can't just add a collider to the road because then it wouldn't detect collisions with its edge if the player is inside the collider. I tried adding 2 edge colliders to each edge but I wasn't sure how to do that
@anonymoussloth6687
@anonymoussloth6687 3 года назад
Also, in conjunction with this issue above, even if I solve how to add the colliders, how can I make the road endless and have random turns? I first thought to make different road segments but that doesn't seem good since I don't want to repeat the same road part multiple times. I want it to randomly turn and generate infinitely
@MrPRECLIK
@MrPRECLIK 3 года назад
@@anonymoussloth6687 For random generation, you just need to spawn those end points and adjust anchor points to match the curve of turn. For endless games, best solution is to spawn track in segment and delete those that you don't longer needs. First make your game with straight line and than add spline, it will be easier for you if you strugle with it
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Divide the spline into various points, calculate the forward vector of those points, then rotate them 90º and -90º and you have the offset for the edges. Then place an object there with a collider. Track segments is the easiest way to do an endless road, if you make about 10 of them that already leads to tons of randomness. Or just use math to calculate the next point position and more the anchors and handles.
@shrodingerscat8940
@shrodingerscat8940 3 года назад
I need your help once again I just started with unity and should I learn 2D game development or 3D game development? I have no almost knowledge of unit or coding.
@Unknown_Programmer
@Unknown_Programmer 3 года назад
I started with 3d with brackeys beginner tutorial And I feel 2d is hard
@shrodingerscat8940
@shrodingerscat8940 3 года назад
@@Unknown_Programmer ooh
@SaSeshen
@SaSeshen 3 года назад
IT really depends on what you are trying to do and what support software you are using, an what kind of assets you have access to. From there it is learning the syntax of the programming style necessary, and the workflows of the programs you are using. I have been playing around with 3D Modeling for at least 2 months and have yet to find a way to integrate my 3D models into a 3D space, but was able to following along, coding in real time, with tutorials and was able to create fully functional games, modules, and scripts that sever a myriad of solutions. It's all in what you are already familiar with and what comes naturally to you!
@o2xygen717
@o2xygen717 Год назад
Hi. I need to make a spline that is part of my 3D game's GUI. Is there anything you could point me to? Thanks.
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
If your UI is already set up in 3D then everything should work. If you can see a regular 3D cube then you should be able to see the spline mesh. Maybe it's just rotated the wrong way and the UI camera is seeing the backside of the spline?
@o2xygen717
@o2xygen717 Год назад
@@CodeMonkeyUnity Thanks. I need to look into how UI works more.
@vinaygodara6602
@vinaygodara6602 2 года назад
Road contain only one strip , even i use tilling
@Ziplock9000
@Ziplock9000 Год назад
Do Unity's SplineUtility and BezierUtility not have some functionality that can replace some of this hand crafted code?
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
The Unity Spline package does seem awesome although I haven't used it myself. Back when I made this video that package didn't exist, nowadays I would probably use their package
@Ziplock9000
@Ziplock9000 Год назад
@@CodeMonkeyUnity Even though I've used Unity for quite a few years now it's new to me too. I've not been able to find any examples of it's use though, which is strange. Just to be clear, I'm not referring to 'Sprite Shapes' which may internally uses these.
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
Yeah it's the Splines package docs.unity3d.com/Packages/com.unity.splines@2.0/manual/index.html It just recently got a huge upgrade in Unity 2022 LTS, I need to find some time to research it
@Vantivify
@Vantivify 3 года назад
Can you make a slash effect with splines??
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Slash how? It's just a point curve in the world, you can use it to define a slash curve
@colbykuzontkoski3872
@colbykuzontkoski3872 2 года назад
Great video! But once you hear the sound of that keyboard it drives you nuts! Why is that keyboard so loud?
@CodeMonkeyUnity
@CodeMonkeyUnity 2 года назад
It's under the microphone, I can't really add anything between my hands and the mic
@maltee69
@maltee69 Год назад
This guy really uses light mode
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
Yup, dark mode burns my eyes, I can't look at it for more than 10 seconds
@CezarWagenheimer
@CezarWagenheimer 3 года назад
Hi! Could you explain a little better how the % operator works?
@bladescreed
@bladescreed 3 года назад
Modulo will return the remainder of the operation, so if you took 5 and divided by 1, the result would be 0 as there is no remainder, however if you took 5 and divided by 3 you would get 2 as the remainder as 5 can only be divided by 3 once
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Yup what @Jadefire16 said, it returns the remainder of the operation. So in this case as the timer goes above 1f, like 1.1f, it loops back and ends up with 0.1f
@zakhounet
@zakhounet 2 года назад
Hi, first of all thanks for your tuto and Udemy courses (I am one of your student ;:). I've imported the package in a fresh project (under Mac OS) on Unity 2021.2 I can't launch the Spline done scene "GameScene". i am having an Error : Prefab instance problem: car-passenger (Missing Prefab with guid: 7a1d88942353f4528b7e0dcbf832516b) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) Any ideas on how to fix it ? Thanks in advance
@CodeMonkeyUnity
@CodeMonkeyUnity 2 года назад
I did not make the car asset so I can't distribute it. But that's just the visual, the spline itself should work fine
@alexbilesck3913
@alexbilesck3913 3 года назад
Hey! Can this be used to make a race car AI?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
It's just a shape so I'm not sure what kind of AI you're envisioning. I covered a car AI here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xuCtxIcfboM.html
@user-dk5to4oc4k
@user-dk5to4oc4k 7 месяцев назад
is there anyone to tell me the name of the program / software used in the video??
@CodeMonkeyUnity
@CodeMonkeyUnity 7 месяцев назад
I'm using Unity
Далее
Stray Kids <ATE> UNVEIL : TRACK "MOUNTAINS"
00:59
The Beauty of Bézier Curves
24:26
Просмотров 2 млн
Better Coding in Unity With Just a Few Lines of Code
15:27
Bézier curves (Coding Challenge 163)
22:59
Просмотров 265 тыс.
Understand Unity Rotation in 5 minutes
5:23
Просмотров 13 тыс.