Комментарии:
I did this a long time ago in a galaxy far away in XNA, interesting you avoided a Recursive method
ОтветитьOk but how do i do the same thing without the diagonal path
ОтветитьI have done same thing as yours but my grid is not showing up
ОтветитьI tried following along with the code but the Grid code has changed since the previous video. So, I grabbed the unity package and got the code from there. I get an error in Testing.cs in Start() with this line -> pathfindingDebugStepVisual.Setup(pathfinding.GetGrid()); NullReferenceException: Object reference not set to an instance of an object
Ответитьthese tutorials suck, follow one and new stuff shows up in the next with 0 explanation or what it is or what it does
ОтветитьThanks for the tutorial! Im using pathfinding for many different objects, so I have the issue that I would need to clone the main grid to a var inside the object each time it has to pathfind, since if two objects are pathfinding at the same time one might overwrite the values of a tile like the F cost, then the other uses that wrong value. Im debating whether I should clone the grid or change the tile object so that it contains a list of H/G/F costs and assign an index to an object. The grid is 90x90, so cloning is quite expensive!
ОтветитьHow do i make the unit not move diagonally? i tried to cheat by making the diagonal cost be 99999 but is there a proper way to do it?
ОтветитьFor people doing this in 2023, do the grid video, then do this video, but you'll have to suffer for a bit with errors and not be able to test. Eventually he shows the code required to test. I can't remember if the generics video was needed, he updates some of the code in that one as well, but I think he eventually shows it here as well. It's very hard to follow. Thank god for chatGPT. Edit - Actually I ran into more issues. Probably should just download the files through the website or move along to another tutorial.
ОтветитьHi Code Monkey
i have been trying to follow your tutorial and i'm having issues with "grid.GetGridObject" because i can't see it anywhere in the grid tutorial or this tutorial and now im stuck because im dealing with a function i have no idea on what it dose
What changes will be needed to apply this to 3D?
ОтветитьWait, do I need to watch the entire video series on grids to implement this code? You show the first video of the series while that doesn't seem to be enough as I'm running into errors.
ОтветитьI'm not sure it makes sense to have the pathfinding algorithm instantiate a grid inside of it. I feel like using dependency injection would result in more understandable and modular code. I also think it would make more sense to have showdebug passed in as a variable.
ОтветитьAwesome tutorial! I'm making a clone of binding of isaac and this worked like a charm! Thank you codemonkey!
ОтветитьThank you for this, really helps :)
ОтветитьGreat tutorial. The only annoying thing is that i have to watch 4 videos because the are to much external reference in order to understand 1 single video.
ОтветитьThe pathfinding works great on a 20x10 grid but for some reason the character takes a while to think and then move on a 30x30 grid. Any reasons why, how can I alter the code for it to work normally on a 30x30 grid?
ОтветитьSo wait... This is demonstrating how to create the pathfinding from scratch? Not showing how to implement the already-existing A* package?
I spent so much time watching this before that began becoming apparent.
Hello Sir, I have a question. You use Grid<PathNode> here to create map with pathfinding, but what if I want to use Grid<Sprites> to build a map, do I just new another Grid map?
ОтветитьAwesome tutorial man. I've been trying to set up some pathfinding in my game for a while now.
The only thing I'm having trouble with is setting it up to fit a certain area/screen coverage. I know I probably have to do some stuff with the Grid or the camera, but my grid is always partially off screen to the far right unless I make it really small.
How could i clean the grid in order to create a new one? I want to create a dynamic size grid to this.
ОтветитьHey @CodeMonkey, thanks for this gr8 tutorial !
Have a question - where the PNode a & PNode b came from in the CalculateDistanceCost()?
Thank you for all your work. You're amazing
ОтветитьBro when did you define the GetNode function, I'm scouring through the video and I cannot find it what the heck
ОтветитьHello sir, did you do something to make the grid show in the center of the camera? Because I am adding some offset in my main camera inside testing script on start method to adjust it dynamically. I don't know if I missed something.
ОтветитьYes I would really want to see a video on optimizing the algo..plz
ОтветитьIf we add "if(_openList.Contains(neighbourNode)) continue;" in foreach, we can pass more cells. But can I ask you is it efficient way for optimization? Or is it possible to cause any bugs?
ОтветитьI am getting a ton of errors because "GetNode" does not exist, what is the code for "GetNode"?
Ответитьunity: I will give 3d pathfinding
devs: pathfinding for 2d too, right?
unity:
devs: pathfinding for 2d too, right?
Hey
I wanted use this script to my project but it is too slow. When enemies chasing player, unity have too many calculations with MOVING player so game crash. I DONT want to use ready internet scripts, i want use my own script created with this tutorial but its too slow. Can i optimize this script without taking too much time? pls help I've been dealing with this problem for a very long time and i dont want to watch more tutorials. I am using unity 2d so nav mesh will dont work.
Where did you write the GetGrid function? I can't find it and it's driving me insane.
ОтветитьHere's my issue and I have no idea if anyone will bother answering it, but here goes. I am pretty much a total beginner here so forgive my general dumbness--for the character movement bit, I understand the part about being able to return a list of Vector3s. My issue is that I just want to want to move a simple object (like, just a square) along the path, without using your character animation scripts/assets, but I just don't know how to do that. How do I modify this script to make so I can just move a simple object along the path instead of a character? I know it's probably incredibly simple, I just can't figure out how to actually do it due to my general inexperience...
Does the character pathfinding movement handler get attached to an actual gameObject? What script does get attached to the gameObject I want to move? I have absolutely clue. lol
You forgot to change FindPath from private to public so Testing can use it. You know, if you're going to make a tutorial, maybe use the actual code you showed during the tutorial instead of one you already typed up?
Ответитьin making pathnode class it is not allowing me to make a variable of Grid<PathNode> grid;, help please , in problemmmmmm
ОтветитьWow this video is gold
ОтветитьHI!
I did not understand the benefit of GCost?
how would you change the code in order to make it not to crash on huge/difficult maps?
Ответитьi love when you skip some crucial parts just to make ppl donate/pay you :) lovely
Ответить