In under 20 minutes I learned how to make something that would have cost me $50 on the asset store
@audacityfilmsproductions5334
4 жыл бұрын
EXACTLLYYYYY!! Wonderful time to be alive!
@c4dtuterials
4 жыл бұрын
more like 15 minutes
@flowcooksboogershook9711
4 жыл бұрын
Compare it with this video, then.
@utetwo9709
4 жыл бұрын
I use an engine without an asset store. I have to make EVERYTHING!
@MohammadFaizanKhanJ
4 жыл бұрын
Indeed! but much time required to build the whole system! Here comes asset store!
@xenibyte5898
4 жыл бұрын
I'm interested in seeing how you would implement an anti collision system for pedestrians so they don't have glitchy bumpy movement due to colliders. I would imagine using a spherical or circular collider and a script that uses some sort of dampening or weight to slow down and push pedestrians around without being so harsh.
@HAWXLEADER
4 жыл бұрын
You could give them some sort of force field constraint or even make them physics based.
@markiewicz.szymon
4 жыл бұрын
Or you could make it using a Unity build in navmesh to save ton of work. Set sidewalk to walkable, road to not walkable, twak some navmesh agent settings to get more natural movement and you can also easily implement obstacle avoidance. Then you can even make some interesting mechanics that will simulate how people normally move around. Example: go to friend's house > go for shopping > return home.
@katebriggs3918
4 жыл бұрын
I'd do some research into flocking behaviors. That would even give the added benefits of people walking in groups. (But maybe also people randomly switching who they're friends with)
@preeteshshirkar5451
4 жыл бұрын
@@markiewicz.szymon navmesh does'nt help you in creating a lane traffics system
@DJLKM1
4 жыл бұрын
Though it might endup quite system taxing for a large project, but to avoid ped collision, you could add a raycast or preferably a spherecast to the AI script. And detect other objects before a collision occurs. This could also be added to for obsticles on the sidewalk and later for avoiding getting run over :)
@jonesbbq307
4 жыл бұрын
GTA V's traffic system must have a parameter called "stupidity" set to 200000
@selvesa
4 жыл бұрын
It actually does! Devs made the AI capable of making bad decissions and failing in porpouse cause, as u know, idiots do exist in real life too. Sadly, as u also commented, that chance may be set to "2000000" cause it happens more often than it should x)
@abigweed1811
4 жыл бұрын
@@selvesa You're talking about GTA V and if their traffic system has a stupidity ratio? Ofcourse it does, that's a really obvious question lmfao
@deei5130
4 жыл бұрын
@@selvesa Aaand literally all of peds have stupidity assign to them
Really would like to see the car traffic system you had in mind :)
@sharpenednoodles
4 жыл бұрын
How do you not have a million subs yet? This was amazingly presented, and very easy to follow! Great stuff
@MassimoRough
4 жыл бұрын
Have you shared this video so he get a million of subs yet? Why braggin if not?
@bmxchamp4
4 жыл бұрын
@@MassimoRough I think you may have misunderstood what he was saying. He was saying that he deserves a million subscribers because of how well put together the video was. He didn't mean it in a negative way.
@MassimoRough
4 жыл бұрын
@@bmxchamp4 I think you misunderstood me. I was saying sharing video with others is a way to increase subscribers, while bragging about not having a 1m subscribers does nothing to it.
@GLXY_SHADOW
Жыл бұрын
When you realize that your Unity Engine version doesn't like this code and so NOTHING WORKS.
@Oxmond
4 жыл бұрын
Wow! Great tutorial! A rather complicated subject perfectly reviewed in under 20 minutes 👍🤓
@TrueIndian
5 жыл бұрын
Sweet , concise and on point. Where you don't leave the viewer with some dead end but with new possibilities.Please make more videos
@argentiignis
Жыл бұрын
I am forever grateful for this tutorial
@davidzap
4 жыл бұрын
2:08 When you said that I knew that this vid waqs going to be amazing! :D thanks
@CodeGaff
5 жыл бұрын
Fantastic video as always Matt! I love your teaching process. Looking forward to seeing your channel blow up! :)
@tientam779
4 жыл бұрын
Really nice work. I love both how thought out the traffic tool is and also you covering how to create the UI for it. Definitely create a sequel to expand on the traffic system like you mentioned. If you would consider doing more tutorials that cover the basics of setting up an editor UI like the one you have here, I think a lot of people would be interested in that as well.
@Tikodev
4 жыл бұрын
Yes please do a full fledged tutorial series on this! I would love to see how you make cars interact with pedestrians and traffic signs!
@Husmanmusic
2 жыл бұрын
This is such an amazing video, one issue I've run into though is when you pause your game. There will be a NAN position error. I've found a workaround for this by not putting the timescale to 0 but to 0.001f. It's not the most beautiful fix but hey it's something.
@xenmckinzee8348
5 жыл бұрын
I'm really loving all your videos. Very informative with out holding your hand. Please keep up the great work. :)
@AbhayKumar-kb8tv
5 жыл бұрын
Use should make probably more videos like this, can you make video on any of the topic like realistic combat and pakour
@pennaverdeful
3 жыл бұрын
That's awesome, thank you for this video! Please do another one with more complex behaviour, or even cars! :)
@spikechu
Жыл бұрын
Would love to see an expanded version of this.
@liormax
4 жыл бұрын
dude, do you even realize how amazing is the content you are doing?
@trumanboone5395
5 жыл бұрын
This video is amazing! Thank You! Would you mind doing a video going over the CharacterNavigationController?
@softeuwu
4 жыл бұрын
Agreed! Please go over the CharacterNavigationController
@MohammadFaizanKhanJ
4 жыл бұрын
Not much difficult to write the script as 90% script has shared in the tutorial! I used this into my follow tut vid.
@cassidynoble5466
3 жыл бұрын
Here is what I came up with. I don't know if you're still working on the project, but maybe there are others that could benefit. I got to this by what he showed on screen in the script editor and what public variables were available in the Unity Inspector (currently, I don't have animations on my character so I cut those lines)- using System.Collections; using System.Collections.Generic; using UnityEngine; public class PedestrianCharacterController : MonoBehaviour { public Vector3 destination; Vector3 lastPosition; public bool reachedDestination; public float stopDistance = 1; public float rotationSpeed; public float minSpeed, maxSpeed; public float movementSpeed; Vector3 velocity; private void Start() { movementSpeed = Random.Range(minSpeed, maxSpeed); } private void Update() { if (transform.position != destination) { Vector3 destinationDirection = destination - transform.position; destinationDirection.y = 0; float destinationDistance = destinationDirection.magnitude; if (destinationDistance >= stopDistance) { reachedDestination = false; Quaternion targetRotation = Quaternion.LookRotation(destinationDirection); transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation, rotationSpeed * Time.deltaTime); transform.Translate(Vector3.forward * movementSpeed * Time.deltaTime); } else { reachedDestination = true; } velocity = (transform.position - lastPosition) / Time.deltaTime; velocity.y = 0; var velocityMagnitude = velocity.magnitude; velocity = velocity.normalized; var fwdDotProduct = Vector3.Dot(transform.forward, velocity); var rightDotProduct = Vector3.Dot(transform.right, velocity); } } public void SetDestination(Vector3 destination) { this.destination = destination; reachedDestination = false; } }
@ianfarrell1182
3 жыл бұрын
@@cassidynoble5466 Thank you so much, you saved me hours of confusion.
@namanjhamb5700
3 жыл бұрын
@@cassidynoble5466 Thank you for this! Also, do you have an idea of decelerating and accelerating the object at each waypoint to make it similar to vehicle behaviour?
@MohammadFaizanKhanJ
4 жыл бұрын
Thanks for a wonderful video! Indeed it is a great starting point for us to build a more complex system.
@VHShark
5 жыл бұрын
Love your videos man and I can't wait to see more tutorials from you ;)
@adslpiulentoditalia2545
Жыл бұрын
This is something unbelievable. Thank you very much!!
@mattbridges385
4 жыл бұрын
Dude, Fantastic work!
@crookiemonzter1538
4 жыл бұрын
Amazing. Instantly subscribed. Thank you so much. Please keep making awesome videos.
@razzraziel
5 жыл бұрын
nice vid and good/fast presentation. subbed. you can do mini series on same topic with 2 or 3 videos max. so you can dive into details and also change the topic shortly after the series for non interested viewers. for example, this video topic is good but it feels like it cut half. thanks.
@tdr0794
4 жыл бұрын
very, very useful content. Great video! Keep it up Matt.
@3wGaming
4 жыл бұрын
I wish this was uploaded earlier! I already made my own traffic system. It is almost similar to yours except yours does not spawn depending on player position yet
@kasit008
4 жыл бұрын
You've earned a sub! Great content!
@Odinlevi
2 жыл бұрын
A small mistake, not gonna check if it was mentioned in comments. The way Random.Range(minIncusive, maxExclusive) works is first number will be in this range and the second will NOT. So in WaypointNavigator it should have been (line 35): currentWaypoint = currentWaypoint.branches[Random.Range(0, currentWaypoint.branches.Count)]; In any other way the last branch will not ever been chosen no matter what. Also, I just found out it isn't really supportive of path branching with more than just one branch, sadly :( Not very good at maths and nodes, trees and so on, but I believe that is what really should be used here, no just "previous and next node"
@airtakusa
5 жыл бұрын
fantastic tutorial thank you so much
@oldshamen
2 жыл бұрын
How to do Tilt Shift with URP would be REALLY COOL!!
@GameDevEFacil
2 жыл бұрын
instead of an entry/exit point you could also set a bool variable called isIgnoreBranch, upon entering the branch you check if you will randomize branch entering or just ignore it completely, and then you just: isIgnoreBranch = !isIgnoreBranch;
@coregamestudio
2 ай бұрын
All I can say is WOW! So many cool idea's such as Branching I never thought about before though never worked much with NPC trafficing systems until I now need it in my game. This just blew me away. Looked all day yesterday for good info video's on the subject, found a couple but you my friend made it so incredibly easy to understand. Thank you! Sub'd and liked!
@BAHGaming
5 жыл бұрын
Very cool. Well done!
@prathmeshnavik5094
4 жыл бұрын
LOVE IT!!!!!!!! Thanks so much bro
@CasaSoy
4 жыл бұрын
This was such an educational video and it helped me understand much more about programming and what can be done with Unity. I'm still getting errors though and can't figure out why. I think something was missed in the character navigation script that I can't catch with the pause button. Would it be possible to make the scripts available somehow? Thank you!
@asclepiiusunknown1090
4 жыл бұрын
Yes PLEASE
@MohammadFaizanKhanJ
4 жыл бұрын
Actually he has shared the script of navigation controller! Some additional information required. It will be best of game Dev guide share us the link of Script. Thanks
@PorroYMonster
5 жыл бұрын
Im need character navigation controller!!
@youraveragewizard5079
4 жыл бұрын
I'm having trouble finding the waypoints window to create new waypoints other than that this a very thorough tutorial.
@thepresidentgaming404
4 жыл бұрын
Keep up the good work.You've got new Subscriber
@Atulkumar-sz6tg
4 жыл бұрын
This is just amazing..
@nashiruddin3543
4 жыл бұрын
He - creating custom editor to make waypoint Meanwhile Ctrl - D :- I am joke to you
@RunyCZ
4 жыл бұрын
0:15 actually they survive the fall :D If you look at them, they never fall down, but instead, they are webbed to the wall
@NiclasGleesborg0
5 жыл бұрын
Great video. And cool system.
@andersnissen3062
4 жыл бұрын
Do you plan to do a follow up on this video? It would be great to learn how to add cars to the scene as well.
@marvinv5111
4 жыл бұрын
the extra- branch hack doesnt quite work because the character could still turn around after branching and take the other branch back or walk in triangles. This can easily be fixed by adding a bool canBranch variable to the waypointNavigator that is set to false after branching and true on next waypoint. this way you only need two waypoints branched to each other and NPCs cant branch twice in a row to take the same way back.
@1202loki
3 жыл бұрын
Feels like cyberpunk npcs to me, great job!
@fcf8269
4 жыл бұрын
Got the full screen of the controller for the crowd mesh? It seems that you just show few lines of it. Awesome tutorial; would love to see how did you solve the issue with car jerking around while calculating collision among each other and how to make them move realistically.
@STARmod
2 жыл бұрын
Still waiting the sequel to this one, such a perfect video, the topic of npc behavior and population in games is so good, i love this, thanks bro!
@softeuwu
4 жыл бұрын
Can you please share or do a guide for Character Navigation Controller Script? Thanks
@newbquesttv
5 жыл бұрын
Great video Matt! Super cool stuff and really clearly explained. I'd be interested to see this interacting with Navmesh, which might also address some of the inter-person collision stuff. Great work!
@GameDevGuide
5 жыл бұрын
Thanks Matt. Yup, I avoided navmesh for sake of simplifying the contents however I'm intending to cover it in the sequel video extending this system.
@naorin970
2 жыл бұрын
This tutorial is great, but I want to ask, is this waypoint based on point-wise or area-wise waypoint ? since it looks better than normal waypoints
@499268003
3 жыл бұрын
CDPR like "Write that down! Write that down"
@hostmeto
4 жыл бұрын
How did you make the character controller?
@ab-yf6jm
4 жыл бұрын
Cool.This video is very useful
@sajuthomas09
3 жыл бұрын
HEY PLZ GIVE THE navigation controller full code plz
@workflowinmind
4 жыл бұрын
Man, I discovered your channel yesterday while looking at how to extend the Timeline! Since then the YT algo has fed me with 5 other of your videos, and I absolutely love your way of teaching, some might not realize the amount of work behind these but I'm very impressed. Thanks a lot.
@mrfade352
Жыл бұрын
How do you do a natural walk Decoupling between nodes ?
@halivudestevez2
3 жыл бұрын
high level deep knowledge ...
@kidpog3d101
4 жыл бұрын
Some extra code to add under "Remove Waypoint" : if(GUILayout.Button("Connect current to First")) { Selection.activeGameObject.GetComponent().nextWaypoint = waypointRoot.gameObject.GetComponentInChildren(); Selection.activeGameObject.GetComponent().nextWaypoint.previousWaypoint = Selection.activeGameObject.GetComponent(); }
@BrokenPuzzle03
3 жыл бұрын
Holy shi! This is probably a Gem of a tutorial! Can't believe It took me years to find this type of quality content
@jkjaniszewski
4 жыл бұрын
Bro, the quality! I wish every tutorial was so on point as yours. Subbed and good luck with yt career!
@dominiauk
5 жыл бұрын
Another great video, would love more AI based tutorials. Thanks.
@fetullahatas3927
Жыл бұрын
is there source code for this tutorial ?
@johngrey5806
4 жыл бұрын
Some people would say this tutorial is better than sex. I'm not saying that I'm one of those people, but it was pretty damn good. Liked and subscribed.
@Jukera
5 жыл бұрын
Awesome video! maybe you can take this system a bit further. Thanks
@adapapranathi9941
4 жыл бұрын
Can I get script for character navigation controller
@SacredStoriesStudio
4 жыл бұрын
I want that Character Navigation controller.... please help
@AgsmaJustAgsma
4 жыл бұрын
Hello, I need help regarding this tutorial. Unity keeps freezing whenever I click to play. Any idea how to solve it?
@dunas2662
4 жыл бұрын
Probably has an infinite while loop, look it up
@GymCritical
4 жыл бұрын
Yup, just check all the loops
@nastrotech3415
5 жыл бұрын
where is the character navigation controller script????????
@catsebvincenicgagnon3460
4 жыл бұрын
You can just use a nav mesh agent if you want. It’s easier like that.
@mqoding
5 жыл бұрын
Great channel, lots of very useful content here. Could you do a tutorial on turn-based games? It's a topic that isn't covered in tutorials a lot so it will definately have value I think. I'm extremely interested in a system as used in the game "Dead in Bermuda". Keep up the good work!
@Keyframe3DAinimation
3 жыл бұрын
Really nice video but can you maybe make a tutorial how you could implement this with a road texture of some sort and making it an place able object in the game like you yould in a park building tycoon game. I would really appreciate it.
@GamesInHouse
5 жыл бұрын
Very comprehensive video, thanks a lot for sharing. Are you planning on sharing the project? The only thing that I would like to see is the behavior of pedestrians waiting by the traffic light when red. I know you could change the range to zero so pedestrians don't cross, but that wouldn't be the natural behavior. The expectation would be that the pedestrian chooses to head across but has to wait for the green light.
@omer1615
4 жыл бұрын
This is very cool video since there is no other videos that explains so simply. But I didn't liked the exit branch hack you made. There should be better way to implement that.
@jayg1552
4 жыл бұрын
If you look at the spiderman game mechanic of throwing ppl off roofs, they somehow web up and stick to walls
@Tenenooo
4 жыл бұрын
Cool i understand nothing but... I will copy and paste it
@ithanhunt3250
4 жыл бұрын
*that trembling of the characters when they collide is horrendous*
@GameOnBudget
5 жыл бұрын
0:58 Which Gameplay Name Of Game Plzzz
@regioninteractive6114
4 жыл бұрын
Judgement
@Rajivrocks-Ltd.
4 жыл бұрын
Damn, I wish I would've stumbled across this video 5 months ago when I started my internship :(
@Rajivrocks-Ltd.
4 жыл бұрын
@Allan Reford My company I interned at bought an asset from the asset store and I heavily modified it. Looking back doing it this way would've been 100x better. But yeah I figured it out!
@vaibhavjaiswal799
4 жыл бұрын
yup definitely like see more of Eric Episodes,
@anandsuralkar2947
3 жыл бұрын
U earned a sub, i am working with bolt.so i will need to work it out myself but thats for the idea
@amirulaminazli2573
4 жыл бұрын
can someone share CharacterNavigationController Script
@AyazSardar
4 жыл бұрын
This is exactly what I was looking for. Thank you!
@husko_racing
3 жыл бұрын
"Few lines of code"
@kidpog3d101
4 жыл бұрын
at 9:00 you forgot to set the newWaypoint.previousWaypoint = selectedWaypoint;
@untitledTube
3 ай бұрын
can u tell me what city assets yu use ?
@쭝얼이-b1c
Жыл бұрын
Hello. I love your video but I want to see Character NavigationController script. please
@rtxarkham8912
5 жыл бұрын
can you make a tutorial how to make that realistic road and houses please
@SowedCastelli
4 жыл бұрын
You're the best
@gammingedge8379
6 ай бұрын
what is "lastPosition" variable subtracting at line 53 ? how is declare it at top?
@AmanKumar-tu2og
5 жыл бұрын
Awesome video Eric! This can be extended into various possibilities. If it's possible please upload the project repo on github. Even the project without this demo scene will work too. Thanks!
@arongilli7415
4 жыл бұрын
Thank you very much! Really useful, please continue :D
@Demotana
4 жыл бұрын
This closed a huge gap in knowledge within only 18 minutes, amazing. Thank you for sharing
@ShinAdaMax
4 жыл бұрын
I’m sorry, but where can I find character navigation controller script?
@cello91
3 жыл бұрын
I think it is Part of unity itself :)
@jasper8941
3 жыл бұрын
I think it is something with te version, i will try using CharacterController instead of character navigation controller, i dont know if it will work
@jasper8941
3 жыл бұрын
1 minute later, it doent work
@DEADEYESTUDIO
3 жыл бұрын
yeah cant find either and i have no clue what to do since obviously it needs this script or it doesnt work. glad i realized i doesnt work.....after wasting hours on this tutorial. real cool....
@ChristDuque
4 жыл бұрын
Hello, nice video but could it be possible for you to share the script? I would really like to have it as a starter point.. thanks !
@abjoern
4 жыл бұрын
14:05 whta that ternary expressions really necessary? Is it for readability?
@williamscott3673
4 жыл бұрын
Good question. I learned how to program myself. Once, in highschool computer science class, I used a Ternary expression in my project that I then submitted to my teache. The next day I walk into class and he goes "Oh, Hey! I saw you used a Ternary expression in your code." Me, being self taught, didn't know it was called a ternary expression so I reply "What? What is a ternary expression?" He instantly started accusing me of cheating - copying code from the internet. Oh ternary expressions, the name that nearly got me an F on a project grade. I ended up getting a 101. Cheers!
@3wGaming
4 жыл бұрын
Lol what is it
@BulatBulatov
4 жыл бұрын
Subscribed! goodContent!
@sajuthomas09
3 жыл бұрын
HEY PLZ GIVE THE navigation controller full code plz
@mateusdsp6871
8 ай бұрын
Thank you so much! Jesus is coming back, God bless all!
@Jasperkeyz13
9 ай бұрын
bro could i use the starter assests third person controller for the ped nice video by the way
@nocturne6320
4 жыл бұрын
Wouldnt it be better to use Unitys AI system for the padestrians for going to the waypoints, as it has a built in collision avoidance system?
@VWSPD
2 жыл бұрын
Can any one provide me a script for the AI
@AutonomousOperation
4 жыл бұрын
What's the pros/cons of moving pedestrians with Transform.translate instead of using nav mesh agents?
Пікірлер: 341