(Note up front - it needs to be node point map due to gravity based physics. I am also using collision physics map which works absolutely perfectly and I can update just the area of instantiation. 10/10).
I apologize, I appear to be absolutely stupid. I’m mildly upsetty spaghetti at the moment as well, because I bought Pro hoping it would resolve my issue and it very much did not. Not that I have any issue supporting the dev, to be clear! It just felt like a bit of a bait and switch. So now I really need assistance.
When I create an object on a grid, I create an array of Vector3 around it. So for example, I create a floor square. I need to create 3 nodes - x-1/y+1, x/y+1, x+1/y+1, put them in to _createdPosArray.
So I have my array, thats easy.
Originally, I was moving gameobjects in the parent of the transform for node in to the positions. Then, I need to scan JUST THE NEW NODES, to add them to the pathing area.
It said on the pro upgrade that you can indeed scan just an area to update the nodes for a point graph, and not have to iterate the entire world. Which is great, because my world is about 36,000 possible nodes, recalculating just the 200 I have already causes a noticable few frames using the Scan function.
Well as it turns out, diving further, if you are using Gameobjects to act as nodes, you can’t scan just the bounds that contains those objects and add them to the point mesh? You have to do it through some magical non-gameobject method?
So please help me out here, because I cannot make sense of the documentation;
1 - create a new node at a coordinate
2 - connect it to cardinal direction nodes
Please explain like I am a drunken Canadian. Because currently I am.
public void UpdateTheNodes() {
foreach (vector3Int pos in _createdPosArray) {
???----create node at pos!!!----
Vector3int _posUp = new Vector3Int(pos.x, pos.y +1, posz)
???----connect node from pos to _posUp----
}}
Again, I know I am a little upsetty right now, but please dont tell me to just look at the documentation, I don’t understand it and am clearly stupid and it won’t help.
Hopefully thank you all in advance, and may you all spell Colour properly despite unity demanding the incorrect spelling.