CodePudding user response:
Said method are many, step by step, according to the demand should be divided into two steps: 1, to find no one seat; 2, to find the path specified no seat,So first need to decide whether someone seats, can use an array to save the position directly, someone put 1, no one to save 0, after traversal random sampling from all the 0 index a,
The pathfinding, don't know what's use of the platform, if it is Unity can use NavMash pathfinding, through baking terrain, and then do pathfinding. Consider using a plugin, you can use AStar, can realize demand,
How to write code, specific recommendations for according to the need to find,
CodePudding user response:
With a pathfinding algorithmCodePudding user response:
NavMesh can achieve