I need your help!
I have converted my grid based into a node based path finder used for navigation.
While it’s working i walked into a bug/glitch and to be honest i have absolutely no clue why it is doing what it is doing.
- red cubes are npc’s (with red path line)
- green cube is player and controlled by me (green path line)
- green cube can click anywhere to calculate a path, red cubes got green cube as target.
problem: while all npc’s are 100% the same the bottom ones bug/glitching out, and it has something with a diagonal something/border?
It does throw me an error when it happens: (but i don’t know why he throws it at me)(Don’t explain the error i know what it says)
Python script error - object 'player.004', controller 'Python': Traceback (most recent call last): File "C:\Users\Cotaks\Desktop\node based shortest path.blend\script.py", line 120, in find_path KeyError: 'value = gameOb[key]: KX_GameObject, key "neighbors" does not exist'
Yes confusing, here is a video:
Here is the .blend
Code is a bit messy wanted to clean it up and change some things till i discovered this bug/glitch.
p to play
aswd to move green cube
left click anywhere to set a path for green cube