Given the above array of cubes. Green is the starting position, red being the end position. How can I determine the number of cubes I would have to travel from start to end.
This is done in UnrealEngine, each individual cube is a blueprint actor in the scene.
I can determine distance by casting a ray from start point to end point, but this would give me a direct distance between the two points. I'd like to find the number of cubes i'd have to travel through to get to the end.