Home > other >  For help how to write characters automatically looking for seat script
For help how to write characters automatically looking for seat script

Time:09-17

Is the specific figures come in looking for seat seat - determine whether anyone - to - leave the seat, this simulation restaurant types have a lot of people come in looking for a position,

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 algorithm

CodePudding user response:

NavMesh can achieve
  • Related