Custom Movement on a Grid and Path-Finding: Unity 3D Tutorial

Druidstone Review: • Druidstone: Secret of ...
Files for this tutorial: / randomartattack
Twitter: / randomartattack
Facebook: / randomartattack

Пікірлер: 183

  • @gregorydriscoll8806
    @gregorydriscoll88062 жыл бұрын

    thanks for this for anyone confused (Like I was) at 7:35 he's saying to create an empty(1), then add the GridStat script to that empty(1). Then, create a new empty(2), and add the GridBehavior script to that empty(2). Then, in the GridBehavior script within the empty(2), drag the empty(1) that has the GridStat component. The first empty(1) can in fact be any game object, so if you want to see the grid then make it something with a model like a sphere.

  • @nwm83

    @nwm83

    2 жыл бұрын

    Thank you for clarifying!

  • @Shemwow

    @Shemwow

    2 жыл бұрын

    very helpful. thank you, good sir.

  • @CharlieVillalobosDev
    @CharlieVillalobosDev4 жыл бұрын

    For anyone interested, the pathfinding algorithm he described at the beginning is called Wavefront

  • @RandomArtAttack

    @RandomArtAttack

    4 жыл бұрын

    I did not know this, thank you!

  • @LucasAlfare

    @LucasAlfare

    3 жыл бұрын

    What the difference to A* in pathfinding?

  • @jikosauce

    @jikosauce

    Жыл бұрын

    Thanks your a boa

  • @robertfletcher8964

    @robertfletcher8964

    3 ай бұрын

    There are great pathfinding videos here. kzread.info/dash/bejne/Yp2cxcuGe8_JgJs.html

  • @cvnvr
    @cvnvr4 жыл бұрын

    This tutorial and the information in it is fantastic, but if I'm honest, the way you blitzed through the video was really chaotic. Coding so quickly and leaving errors here and there which you then came back to and fix while in the middle of another point made it hard to concentrate and focus on what you were saying. Not commenting the code as you went at all to allow the viewer to follow along easier (particular when talking about directions because it was just a lot of numbers being repeated over and over) also made it hard to digest. Just my two cents, but thank you otherwise for a great video and for providing this information!

  • @revarddez4817

    @revarddez4817

    4 жыл бұрын

    I agree with Conor, it is an excellent tutorial but from the POV of a beginner it could be extremely hard to follow and understand whats going on. There is also the last part where you have the ball moving which you use to test your array. It kinda hit me that I wanted to test my code to see if I made any mistakes. But you didn't include how you integrated it with the moving object.

  • @turkeyjerkey
    @turkeyjerkey3 жыл бұрын

    One of only a couple videos I could find on this topic, and this is the best! Well done!

  • @matthewgigante4556
    @matthewgigante45564 жыл бұрын

    You really didn't include how to actually move an object on this grid that we have spent almost 30 minutes working on? You just threw in your own AI script at the end without explaining how it interacts with the grid system???

  • @deepakkalyani4935

    @deepakkalyani4935

    3 жыл бұрын

    yes bro i facing same issue here.

  • @theresnothinghere6960
    @theresnothinghere69604 жыл бұрын

    way over my head. I can't wait to come back to this later when I know enough to understand what you're saying.

  • @dageddy
    @dageddy2 жыл бұрын

    This video was a great help. The code works and can be optimized further as pointed out by others. Creator flew by his code entry and corrections so I needed to rewatch several times but all's good. The UI code wasn't shown but I only wanted to adopt the pathfinding modules. The important thing is the grid resolution be setup exactly 1 unit square to work well with the codes. x-axis represents column traversal while y-axis is row. 0,0 indicates the left-bottom tile. Given any x,y tile coordinate, x-1,y would be the adjacent left tile, x,y+1 the adjacent top tile and so on. The gist of the pathfinding process is first to walk the entire tileset and set the individual tile "visited" values. Start tile is value 0, adjacent tiles (top, bottom,left, right) are 1 and so on fanning outwards. Second is to decide on an End tile, look for it's "visited" value and walk the tiles to pick those with decrementing "visited" values all the way back to the Start tile. A (optional) visual improvement is to apply vector distance computation to choose the best tile from a selection of tiles with the same "visited" value, which is done in "FindClosest" function. Otherwise the shortest path could be a long line of horizontal and vertical movements, instead of a more pleasing zig-zag manner.

  • @jianingzhuang104
    @jianingzhuang1043 жыл бұрын

    The most interesting part: Grid AI script, is not demonstrated.

  • @mobeenahmed361

    @mobeenahmed361

    7 ай бұрын

    Is it resolved, if yes, please share..!

  • @vexingcoder3437
    @vexingcoder34374 жыл бұрын

    Ahh.. this exploded my brain cells and created new ones thanks bro

  • @greenkidyt
    @greenkidyt4 жыл бұрын

    The code at the end isn't the same as what the guide went through. Multiple variables are added right at the end with no explanation. What a waste of time.

  • @Programm4r

    @Programm4r

    4 жыл бұрын

    Yeah, there were a few unused instantiations in this tutorial - specifically in the SetDistance() method. For instance, he has a testArray that is not doing anything at all. lol

  • @noahfuentes9244
    @noahfuentes92444 жыл бұрын

    when I run the "GridBehavior" script, it does not go through either of the for loops. When i call the function in the if statement, it skips both loops and will do any other statements after that in the conditional. Any help with this would be awesome! Thank you!

  • @longuemire748
    @longuemire7482 жыл бұрын

    Excuse me but how do you draw the maximum displacement area with a bright line? Or just the name to look up on the internet for information on this?

  • @preflopstore9718
    @preflopstore97183 жыл бұрын

    Thats awesome! quick question, what if it's a tie to the shortest distance?

  • @paradisumworldparadisumwor921
    @paradisumworldparadisumwor9212 жыл бұрын

    How can I make the grid work for 3d scenes with more than 1 floor that can have multiple connections between floors?

  • @Eirreann
    @Eirreann4 жыл бұрын

    I'm having a spot of trouble trying to figure out how best to move an object to the path defined. I'm not sure how to go through items in a list and have an object move to each in order. Any advice/feedback?

  • @LordVonLeo

    @LordVonLeo

    4 жыл бұрын

    Yeah I have the same problem. Would love a tutorial on that

  • @HiImBoredAF
    @HiImBoredAF4 жыл бұрын

    You lose me right in the beginning. I followed your code to the tee but I am only getting a single cube (I chose a Cube as my "Grid Object"). Taking a look again, the icon next to your prefab in Inspector doesnt look like mines. Is that a special kind of prefab ?

  • @revarddez4817
    @revarddez48174 жыл бұрын

    Would it be possible to have a tutorial of how you link that Sphere at the end to the grid? I'm wondring how to use that grid/generated path with an object... Also it is clear that at the end of this video, the code has been modified since there's an error generated with the removal of some grid objects..

  • @mobeenahmed361

    @mobeenahmed361

    7 ай бұрын

    did you get it..?

  • @viscarious1

    @viscarious1

    28 күн бұрын

    @@mobeenahmed361 I guess you got nothing? I was hopefull i finaly found a solution to my game issue.

  • @JD-gy3vy
    @JD-gy3vy3 жыл бұрын

    Is there a way to do this but with isometric tiles in 2D?

  • @amrsaleh9954
    @amrsaleh99543 жыл бұрын

    But this doesnt move diagonally like in the game as u showed, another thing, how good of performance it would have to check while using the mouse and draw the lines of the path? but great work. I think can also be integrated with navmesh with some tinkering in the scene.

  • @Astamor
    @Astamor4 жыл бұрын

    Is there a chance you could also do it with Unity Tilemaps please ?

  • @KevinHarper3DArtist
    @KevinHarper3DArtist4 жыл бұрын

    I am sure people have said this already, but using the variable name "x" and "y" when iterating through your for loop when generating the grid instead of "i" and "j" will help you avoid confusion.

  • @a.j.jepson8521
    @a.j.jepson85212 жыл бұрын

    Kind of falls short when you didn't go over the Grid AI script. I know this is an old video, but a follow up on how to do the player movement on the sphere would be nice.

  • @loganou9746

    @loganou9746

    11 ай бұрын

    YES ! This part is really really poorly covered. geez

  • @ambientsoda106
    @ambientsoda1064 жыл бұрын

    is there a way to make some of the grid unaccessible, until a boolean condition is met, so some surfaces can be accessed after so condition is met?

  • @RandomArtAttack

    @RandomArtAttack

    4 жыл бұрын

    Sorry for the late response. You could always force the number on the grid via code by setting it to -1 for example. When the boolean is met, simply set it to 0 or whatever number scheme you use.

  • @killerbean892
    @killerbean8929 ай бұрын

    i got error on FindClosest function where its says argumentout of range return list[indexNumber]; is the error code

  • @sebzanardo
    @sebzanardo4 жыл бұрын

    Hey! I have tried this tutorial and made it to the end. I fixed all the little errors, my mistakes, however when i press play and click the findDistance button it creates the path but doesn't move? i've tried pressing it twice but the bigger ball (player or whatever) doesn't do anything? how do i fix it. Is it because i dont have the move and moveSpeed variables u never explained or are they unnessasary?

  • @sebzanardo

    @sebzanardo

    4 жыл бұрын

    If anyone got i working could they please send it to me :( i've tried for so long to get it working. even re-watched the entire video to make sure i did everything right

  • @dongocanh96
    @dongocanh967 ай бұрын

    Can you share how to make the arrow like yours?

  • @ashtwenty12
    @ashtwenty123 жыл бұрын

    You could add a check for if you are adding step at the target location, then you can backtrack, looking for the next lowest number in the sequence, whilst adding to the path array

  • @legendsofninjaxlonx3943
    @legendsofninjaxlonx39433 ай бұрын

    it dind work if i remove one part in the grid, ithink the problem is in the gridArray or in the TestFourDirections?! how can i fix it?

  • @zimmymine5017
    @zimmymine5017 Жыл бұрын

    Got any videos for hex based grid movement?

  • @Alluvian567
    @Alluvian5674 жыл бұрын

    I am new to unity: isn't getcomponent expensive? Seems like doing it every test direction seems very wasteful. would it be better to maybe store a reference to this all the gridstat components in an array?

  • @phleticgaming3981

    @phleticgaming3981

    4 жыл бұрын

    actually that is true. but honestly Get Component wont affect much to the game unless there are many instances of objects referring to it at one time

  • @LettucePlate
    @LettucePlate4 жыл бұрын

    What is GridStats with an S? It keeps changing back to GridStat at different points in the video. At 9:28 this line is giving me an error in Unity and it's running as GridStats in your code.

  • @lynical2439

    @lynical2439

    3 жыл бұрын

    did you ever figure out if he renamed it or if its something different

  • @LettucePlate

    @LettucePlate

    3 жыл бұрын

    @@lynical2439 No i never looked into it further. Sorry

  • @lynical2439

    @lynical2439

    3 жыл бұрын

    @@LettucePlate No worries, think I might have solved it. Thanks for the quick reply on a year old post lol

  • @LettucePlate

    @LettucePlate

    3 жыл бұрын

    @@lynical2439 Np, it happens more than you think! I get notifications for comment replies and I'm on youtube daily so even super old stuff that gets replies I can see it immediately :)

  • @jackblakeston3319

    @jackblakeston3319

    3 жыл бұрын

    @@lynical2439 Hey can you help me out? My script gives me an error because it doesn't understand what's going on the first time he writes GridStats to instantiate the grid

  • @souleymane_guerida
    @souleymane_guerida4 жыл бұрын

    Though i had to do so many modification to your code to make it work for me, but if it wasn't for you .... i wouldn't have got what i need .............. maaaaaaaan you rock

  • @oystercam1040
    @oystercam10403 жыл бұрын

    This was awsome .can u show how to do a path were when the ball find a intersection, it can choose to go or not to that way, moved by a random dice roll??

  • @myximatosis
    @myximatosis4 жыл бұрын

    At 7:35 you should leave a footnote or annotation explaining a little bit better what it is your doing within the editor. It would make the tutorial a lot more straight forward for novice's within Unity to watch your tutorial.

  • @am206l5
    @am206l54 жыл бұрын

    Hello and thank you for this video. Awesome, you have all in your mind when you are programming. I'm French and beginner in programming, but I have understood most of the outline what you said ;-) But it's difficult, normal for me. Thank you !!!

  • @ChristopherLMunoz
    @ChristopherLMunoz5 жыл бұрын

    Finally a grid movement tutorial amazing! Thank you, been looking high and low for this.

  • @PopMusicKiller
    @PopMusicKiller3 жыл бұрын

    Could you please provide us with a free link to the files since we already took the time to go through this?

  • @constanroussel4042
    @constanroussel40423 жыл бұрын

    You are amazing, thanks for this tuto man

  • @anasloukili5490
    @anasloukili549017 күн бұрын

    Can I also use this in 2D??

  • @valorantpros167
    @valorantpros1677 ай бұрын

    hI can anyone help me with the source fille becasue i am lost in step variable and i am not able to accesses his patreon

  • @oicmorez4129
    @oicmorez41294 жыл бұрын

    (14:00) I don't know if I'm the one stupid but all 3 of the values int x = startX; int z = startZ; int[] testArray = new int[rows * columns]; aren't used at all after we make them. We create them, then do a "for (int step [...] foreach... etc and we finish the function without using those values once. even my visual studio tells me that they are useless

  • @MProgamer
    @MProgamer Жыл бұрын

    stumbled on this video and this is amasing, like i can't even understand how you would begin with designing this code

  • @justatho8102
    @justatho81024 жыл бұрын

    Hello and thank's for this very nice work. I'll try it on my project and it works good. I just have one question : when i want to follow the path to move my object, it is done instantly. How can i slow down the movement juste like you did at the end of the tutorial. Thank's angain.

  • @RandomArtAttack

    @RandomArtAttack

    4 жыл бұрын

    Have the game object move towards a target. Look at one of my earlier tutorials (making a mini game) in which I have to animate a moving target.

  • @justatho8102

    @justatho8102

    4 жыл бұрын

    @@RandomArtAttack I've just seen the other tuto and it si just what i need, thanks a lot :D

  • @rollncast2740
    @rollncast27404 жыл бұрын

    Thank you for the tutorial

  • @r0xa4sg23
    @r0xa4sg2310 ай бұрын

    Bro i did all like you but some combinations of tiles dont work... I get different errors...they're not always the same

  • @richardosborn159
    @richardosborn1594 жыл бұрын

    Instead of using ints to determine which direction to go, maybe use an enumerated data type. To the developer, it can be read as a string, but to the computer it's read as an int.

  • @benowen8321

    @benowen8321

    4 жыл бұрын

    c# does not convert enums to ints :(

  • @richardosborn159

    @richardosborn159

    4 жыл бұрын

    @@benowen8321 C# does allow you to cast enums to ints int number = (int) MyEnum.value;

  • @benowen8321

    @benowen8321

    4 жыл бұрын

    @@richardosborn159 I feel dumb I never actually tried casting it. Thanks for the reply.

  • @richardosborn159

    @richardosborn159

    4 жыл бұрын

    @@benowen8321 No worries. Some languages are will do the conversion automatically for you. C# likes it to be explicit. :)

  • @benowen8321

    @benowen8321

    4 жыл бұрын

    @@richardosborn159 Well that is what through me off. I had done it in c++ no bother, and in my mind I just always thought they were just ints.

  • @jijigri9224
    @jijigri92244 жыл бұрын

    How did you do to move the sphere along the path? I'm sorry, I really thought I could figure out alone, but after banging my head on it for a few hours, I still haven't figured out. It's the only tutorial I found which is doing what I really want, now I just need to make the object move. If you can just explain really quickly, I would be so grateful. Thank you

  • @RandomArtAttack

    @RandomArtAttack

    4 жыл бұрын

    That is outside the scope of the tutorial, but I do cover this very concept in my minigame series. Look for the video when I talk about moving targets.

  • @cratuss2661

    @cratuss2661

    4 жыл бұрын

    kzread.info/dash/bejne/pYuBy5Oqf72eqLA.html that should be the video he mentioned but even with that its very hard to transfer it on this project... tbh i didnt got it working :(

  • @viscarious1

    @viscarious1

    28 күн бұрын

    @@RandomArtAttack Did you ever make a tutorial that builds on this one?

  • @RandomArtAttack

    @RandomArtAttack

    28 күн бұрын

    @@viscarious1 No, to be honest KZread kind of killed all the enjoyment of making videos. The algorithm makes it so I felt like I was having to make specific types of videos and it just killed any momentum I had. I may come back someday, but unless youtube stops trying to make creators think they need to do weekly uploads, with clickbaity titles and thumbnails, I don't think I want to come back. :D

  • @viscarious1

    @viscarious1

    28 күн бұрын

    @@RandomArtAttack ​​⁠I can appreciate that. Could you go into rough details with how to set the target position, and transfer the path list to a game body?

  • @dancaste2216
    @dancaste22162 ай бұрын

    Hi everyone, If you are working on a 2D game, you will find the instantiated objects not showing properly. That's because we set the transforms 'x' and 'z' in this tutorial, but for 2D 'flat' games to instantiate the grid prefabs you may want to set 'x' and 'y' instead. In short, this like instead of the one given in the tutorial (please note I used slightly different var names! GameObject go = Instantiate(gridPrefab, new Vector3(leftBottomLoc.x + scale * i, leftBottomLoc.y + scale * j, leftBottomLoc.z ), Quaternion.identity);

  • @mythran1162
    @mythran11624 жыл бұрын

    Can´t you move diagonally?

  • @lominero5
    @lominero5 Жыл бұрын

    Very impressive, thank you so much

  • @priamy22
    @priamy225 жыл бұрын

    Where to create the grid prefab? is it a sphere prefab?

  • @RandomArtAttack

    @RandomArtAttack

    5 жыл бұрын

    Great question, it is just an empty. If you want to use a sphere you can, and just turn off rendering, but it will be slower.

  • @beaverjoe9171

    @beaverjoe9171

    4 жыл бұрын

    I guess he used the Gimoz. you can find on your inspector. The default is one gray white cube

  • @BFFUWGTHAFO
    @BFFUWGTHAFO4 жыл бұрын

    druidstone's movement includes diagonal movement, can you make another tutorial implementing diagonal movement?

  • @RandomArtAttack

    @RandomArtAttack

    4 жыл бұрын

    I have a laundry list of tutorials I would need to get to first, so basically I would do the same principle but check 8 directions instead of 4. Sorry I can't make a full tutorial, but I hope that is at least a helpful start.

  • @CasualCosta

    @CasualCosta

    4 жыл бұрын

    It's probably a classic A* (A star). There are A LOT of tutorials on them around.

  • @jikosauce
    @jikosauce Жыл бұрын

    One type of game on my list is a tactics. I would love to practice with a remaaster of kartia. That would be fun. Your visual explanations are great and help, I can't always imagine when people just explain with words. But this reminds me of minesweeper

  • @CGPepper
    @CGPepper2 жыл бұрын

    Great tutorial. I wish you would playtest it more. Build a grid, playtest. Start at 0,0 , playtest with debugger to check values, check all nearby squares, playtest values. Now we are using lists, vars, step - 1, step +1, just step, test direction - 1, writing a function that will check something once but we will put it in the loop later, for 30 minutes, on yeah, you forgot to put Y value in the array on 12:22 .. It would actually be much easier to copy paste the code and step through with debugger, than to follow along.

  • @footbx-live5965
    @footbx-live59654 жыл бұрын

    could u please provide the script?? I wrote it but for some reason, it didn't work

  • @Programm4r

    @Programm4r

    4 жыл бұрын

    Well, that doesn't help anybody out. Be specific, and someone can help you out.

  • @thedude110
    @thedude1104 жыл бұрын

    The tutorial was going great until you skipped some crucial steps. Suddenly you have a new object called GridGenerator and one called GridObject which were never explained. I'm not sure this was your intention, but the impression it gives is that we need to support you on Patreon to actually be able to follow the tutorial

  • @malikbenslimane2873

    @malikbenslimane2873

    4 жыл бұрын

    He said that he skipped it, it's just an empty GameObject, a parent for the gridprefab and also contains the gridstat script.

  • @malikbenslimane2873

    @malikbenslimane2873

    4 жыл бұрын

    And gridobject are the yellow spheres

  • @bensontsai1166

    @bensontsai1166

    4 жыл бұрын

    @@malikbenslimane2873 but i got null NullReferenceException what should I do?

  • @akarahexels677

    @akarahexels677

    4 жыл бұрын

    I don't know if you still want it, but the error must be on your gridPrefab. Go into Unity, drag your Prefab into the Hierarchy and drag the Grid Stat script, as Malik Ben said. After that, turn it into a prefab again and it should work.

  • @samgamgi

    @samgamgi

    4 жыл бұрын

    ​@@akarahexels677 and Malik Thank you. As my first project, I tried replicating this video, but I knew nothing from Unity at the time and got lost at this part. Now, after some Unity beginner videos, instead of nothing, now I know next to nothing(big difference!), and was able to follow your instructions and create the grid.

  • @lofisenpai2872
    @lofisenpai28722 жыл бұрын

    I know this is an older video but a follow up on linking an object like the sphere to the grid would be amazing

  • @memebox9189
    @memebox91894 жыл бұрын

    the code you wrote, is different to the example u showed at the end, you have a variable called "object to move" but when your guiding us through your logic, you don't seem to have this variable in your script. So where is the line of code that actually tells the game to move the object? Also in scene, you script is GridAI not GridBehavior.... just a little lost, if you could point me in the direction that would be great, thanks

  • @memebox9189

    @memebox9189

    4 жыл бұрын

    actually in my situation, I do not need to move something, I just need to find something closest to a given grid position

  • @morgansurname6544
    @morgansurname65443 жыл бұрын

    What's the point in checking y + 1 < rows && gridArray[x, y + 1]. If y + 1 < rows is true then so is gridArray[x, y + 1].

  • @craftercis
    @craftercis2 жыл бұрын

    Hey. I followd the whole tutorial but now I see the script is changed at the ending. Could you give me the code I'm missing.

  • @mobeenahmed361

    @mobeenahmed361

    7 ай бұрын

    did u find..?

  • @adesnoakuro
    @adesnoakuro4 жыл бұрын

    excellent video bro can create one list reproduction of this type of game?

  • @Wevli
    @Wevli4 жыл бұрын

    at 12:45 you bring up a visualisation and talk over it but the picture doesn't change. So its a bit pointless, it doesnt explain anything

  • @nosh247
    @nosh2474 жыл бұрын

    I love this video! now it is one part of the grid based movement I have been looking around how to project the grid onto the terrain, the way they do it on xcom, druidstone, phoenix point. I guess this might be shader based, but if you had any insight on how to do it and feel like making a tutorial it would be awesome!

  • @lyl14ghost

    @lyl14ghost

    3 жыл бұрын

    same here! Xcom is my main inspiration.

  • @DarthStevenus

    @DarthStevenus

    3 жыл бұрын

    Same, trying to make a proof of concept for a kind of XCOM style mech fighting game. Got the camera down, and I've got a simple "mech" made of cubes and other primitive objects. But I can't find a good grid tutorial.

  • @yearlyspash6442
    @yearlyspash64424 жыл бұрын

    can you do this again but with a hex based movement

  • @RandomArtAttack

    @RandomArtAttack

    4 жыл бұрын

    Sorry for the late response... maybe... I think it would be similar except you would need to check 6 directions instead of 4.

  • @kosta1570

    @kosta1570

    4 жыл бұрын

    @@RandomArtAttack 8

  • @Zerossoul

    @Zerossoul

    4 жыл бұрын

    @@kosta1570 6 sides on a hexagon, 8 sides on an octagon. So in this case, 6.

  • @michazadkowski8516
    @michazadkowski85164 жыл бұрын

    In testdirection i got error with case:4 index was outside the bounds of the array...

  • @Zerossoul

    @Zerossoul

    4 жыл бұрын

    He changes it up at the end of that section. Pay close attention at 12:00. in about 5 seconds from then, the code changes a lot.

  • @mrgonuts
    @mrgonuts2 жыл бұрын

    thanks good video but bit confusing make a prefab with the gridStat script on it have an empty at 0,0,0 with the gridBehavoiur script on it

  • @kerim404tt5
    @kerim404tt55 жыл бұрын

    can u make tutorial game for this movement. with touch or with mouse clicking.. drag and drop some heros and it will be 2d image to 3d object to gameboard like clash royal.. and they will start move.. it can be soldiers movement with different guns.. not have to be heros like clash royale

  • @RandomArtAttack

    @RandomArtAttack

    5 жыл бұрын

    Maybe in the future, but right now I have several other tutorials scheduled.

  • @vexingcoder3437

    @vexingcoder3437

    4 жыл бұрын

    dude.. that is so specific haha just find some tutorial for each of these features or discover it your own and merge them into a game.

  • @kerim404tt5

    @kerim404tt5

    4 жыл бұрын

    @@vexingcoder3437 dude im new on coding 😇 soo i need see how it works excually- im learning with my eyes not with brain 😋

  • @vexingcoder3437

    @vexingcoder3437

    4 жыл бұрын

    ​@@kerim404tt5 well if you say so just don't stop on learning ;)

  • @MrCZRC
    @MrCZRC3 жыл бұрын

    Do you quickly edit out yourself fixing your mistakes because you make a mistake but fix it unbelievably fast its an amazing skill. Also very nice code i struggled to keep up but will try my own version someday you give good inspiration

  • @killjoysixx
    @killjoysixx4 жыл бұрын

    So... there's no "follow path" tutorial"??

  • @olza9720
    @olza97204 жыл бұрын

    Thanks for tutorial but it doesn't work ((( created cube prefab with gridStat but it doesn't find anything.Please,help !

  • @loganh2735

    @loganh2735

    3 жыл бұрын

    You have to put it on THE prefab, not the object in it. Open the prefab editor by double clicking, click the topmost object in the left panel, then apply the script to that.

  • @MidnightshadeProductions
    @MidnightshadeProductions Жыл бұрын

    great im testing path finding on UE5 to see different methods and compare their performance

  • @charlesmasclef1309
    @charlesmasclef13094 жыл бұрын

    Really good alternative for the A* algorithm and the production quality is on point. You got yourself a new subscriber ! However I might have a suggestion for increase performances. Do two list of GameObject, one for the visited cells and one for the unvisited cells. That way, on your SetDistance method you don't have to check which is already visited and which isn't. It'll be better for multi-threading efficiency.

  • @PorterNielsen

    @PorterNielsen

    4 жыл бұрын

    Brilliant, that is such an elegant solution. Using your improvements I think I could actually extrapolate this for pathfinding in 3-dimensions and have it still run optimally.

  • @floriancazacu4504

    @floriancazacu4504

    Жыл бұрын

    Also, GetComponent is probably the least performant way to do this.

  • @matthewgigante4556
    @matthewgigante45564 жыл бұрын

    I will iterate again for those sorting by new: DO NOT USE THIS TUTORIAL. IT WILL NOT TEACH YOU HOW TO MOVE ANYTHING ON A GRID. To find that out he wants you to pay money to access his Patreon files or whatever.

  • @turceanucosmin7223

    @turceanucosmin7223

    3 жыл бұрын

    it's not that hard anyways ffs

  • @OmeedNOuhadi
    @OmeedNOuhadi2 жыл бұрын

    Awesome!

  • @SniperSpy10
    @SniperSpy105 жыл бұрын

    7:40, kinda confused on what you are meant to do from here

  • @RandomArtAttack

    @RandomArtAttack

    5 жыл бұрын

    Specifics will help me clarify. What exactly don't you understand so I can help?

  • @SniperSpy10

    @SniperSpy10

    5 жыл бұрын

    @@RandomArtAttack NVM, got it working, the IDE was having trouble changing the name of the script

  • @RandomArtAttack

    @RandomArtAttack

    5 жыл бұрын

    @@SniperSpy10 I am glad you got it working, I am surprised by how many times that has bite me in the butt. I know the name of the error by heart at this point, but I still forget to catch it on my own.

  • @cratuss2661
    @cratuss26614 жыл бұрын

    sry but isnt it kinda pointless to make a whole video about the Grid Movement if you skip the actual Movement part? I mean you generate a grid ok.. but how can i move my Player arround e.g. with mouse or WASD pls help x.x

  • @brimiethehospitabledragon5212
    @brimiethehospitabledragon52122 жыл бұрын

    This was interesting but you leave out the part of the script that has the sphere and moving the sphere along the path. I guess that part you expect for people to find out on their own but that doesn't make for a very good tutorial. Mainly because I can't see it work for my self. Please release another smaller video explaining how you put the Object To Move, Speed, Move, and Move Step variables in. Thank you for the video.

  • @Nellowed
    @Nellowed6 ай бұрын

    how do we do this in roblox

  • @arthurschirrmann36
    @arthurschirrmann363 жыл бұрын

    Don't waste your time if you're not one of his patreon the video isn't finish

  • @devworkstation5073
    @devworkstation50734 жыл бұрын

    I litteraly stopped the video in the middle just to make sure I liked the tutorial! You are a legend bro the way you explain and clarify things :o

  • @minibossgaming9325
    @minibossgaming93258 ай бұрын

    GridAi?

  • @alexarrigo7362
    @alexarrigo73623 жыл бұрын

    Good presenter but poor tutorial - recommend skipping this especially if you're very new to Unity as you won't get anything functioning from following it step-by-step

  • @francispasive4474
    @francispasive44743 жыл бұрын

    Luckily I didn't follow this tutorial in my game instead I follow this in a new unity project. The code for generating the grid works but the pathfinding is not even working. the path only adds one object. I kept repeating the video just to make sure I did not make a mistake or some missing line of code but I didn't. The video just keeps jumping around without explanation. I'm not usually the person who complains but man this just frustrates me. You let me down, man. I was having high hopes when I found this video. But you know what I'll just keep in mind how you visualize the pathfinding and I thank you for that. bye~e

  • @vishnutejakoyya1813
    @vishnutejakoyya1813 Жыл бұрын

    GitHub repo?

  • @Programm4r
    @Programm4r4 жыл бұрын

    Probably could make it smoother by evaluating all 8 directions instead of just 4. Gonna do some tweaks for performance and memory. Thanks for the general idea though! *Update* Here is a sample of my modified A.I. from this follow-along tutorial. I've worked with 2D arrays before, but never A.I.. The A.I. is set to randomly patrol. Enjoy. kzread.info/dash/bejne/qXd6yNeylJO1lrQ.html

  • @112DEEP12
    @112DEEP123 жыл бұрын

    1. use enum instead of int 2. code should be more readable 3. for int i=step, step > -1, step-- ?? you have reduced step in it then why have you used i

  • @lulasz_

    @lulasz_

    2 жыл бұрын

    yeah.. i am asking that myself too

  • @abdelrahmanashraf4629
    @abdelrahmanashraf4629 Жыл бұрын

    UNCOMPLETED TUTORIAL! People who liked this video didn't even try to implement it, there is no "custom movement" script in this tutorial only grid and path-finding scripts.. you will have to rely on yourself to create it and link the path generated by the path-finding script to your custom movement script. He modified the script to showcase the project at the end of the video without showing us how to do it in a tut video that is literally titled "CUSTOM MOVEMENT on a Grid and Path-Finding".

  • @guessimnotforth
    @guessimnotforth2 жыл бұрын

    it tok me 6 houers make this work. . . he uses Colums as X and Rows as Y . . .

  • @holliscf

    @holliscf

    Жыл бұрын

    Holy shit, ive going over this the past hour thank you for your comment swapped these and fixed the bug

  • @moric4677
    @moric46774 жыл бұрын

    I lost my brain cells after watching this.

  • @FranciscoJr12
    @FranciscoJr1210 ай бұрын

    Gracias, me tome 3 horas en algo que me soluciono un comentario XDDDD

  • @danielemessina1979
    @danielemessina19792 жыл бұрын

    Wow, this was total trash. Patreon, what a great creation.

  • @jakubkadlec4285
    @jakubkadlec42854 жыл бұрын

    27:03 very suspicious cut

  • @user-gb6vn5kv5w
    @user-gb6vn5kv5w3 жыл бұрын

    Nice, don't work.

  • @morgansurname6544
    @morgansurname65443 жыл бұрын

    Appreciate the tutorial but it's far too fast and you make so many mistakes it's difficult to follow but I got there in the end cheers. No way a beginner would be able to follow this with the mistakes.

  • @endfite
    @endfite4 жыл бұрын

    1 year ago this vid was uplaoded :)

  • @Azihayya
    @Azihayya Жыл бұрын

    cloumns

  • @arthurvonpeercubakowic99
    @arthurvonpeercubakowic993 жыл бұрын

    what a waste of time

  • @payrgames
    @payrgames2 жыл бұрын

    Please don't make videos like this anymore

  • @lucasd.3369
    @lucasd.33692 жыл бұрын

    cloumns