Patent ID: 11904242
Assignee: SHANGHAI LILITH TECHNOLOGY CORPORATION
Field: Furniture, games (Other fields)
Classification: CPC A  G | IPC A  G

Claim 4:
5. A pathfinding apparatus, wherein the apparatus comprises:
a determining module, configured to determine a starting point and a target point of a target object;
a judging module, configured to determine a distance range between the starting point and the target point on a grid map; and
a pathfinding strategy selecting module, configured to select a pathfinding strategy corresponding to the distance range according to the distance range, wherein different pathfinding strategies are adopted for different distance ranges,
wherein the determining a distance range between the starting point and the target point on a grid map further comprises:
determining whether the distance range between the starting point and the target point is within a first threshold size range, and if yes, adopting a first pathfinding strategy, or if no, adopting a second pathfinding strategy,
wherein the first pathfinding strategy comprises:
determining a path from the starting point to a first map navigation point closest to the starting point;
determining a path between the first map navigation point and a second map navigation point closest to the target point; and
determining a path from the second map navigation point to the target point, wherein the second pathfinding strategy comprises:
determining a path from the starting point to a first map navigation point closest to the starting point;
determining a path from the first map navigation point to a first jump navigation point;
determining a path from the first jump navigation point to a second jump navigation point;
determining a path from the second jump navigation point to a second map navigation point closest to the target point; and
determining a path from the second map navigation point to the target point;
wherein the grid map is divided into a plurality of blocks according to a predetermined size, a plurality of jump navigation points are predetermined for each block, the first jump navigation point and the second jump navigation point are selected from the plurality of jump navigation points, the first jump navigation point and the second jump navigation point are jump navigation points that are respectively located in the same block as the starting point and the target point and that are respectively closest to the starting point and the target point.