Node/Pathfinding Calculator
#1

I am creating an npc taxi system to where it will calculate a path from the npcs current position to the players position.

Currently I am using routeconnector but the nodes are not the greatest, do you know of an others, or do you have any suggestions?
Reply
#2

The Nodes are great, what you need is interpolating the Nodes to lower distances and smoothing, look at AIped and my NPC Drivers FS, it also includes a Taxi call function.
The driving doesnt look the best, but with performance in mind I don't think it can be improved much, except SAMP adds more stability to the NPC movement.
Reply
#3

If i use intersection between nodes in calculated path, How do I know when the npc has reached that point to tell him to comtinue to the next?

Thats not even the issue, the issue is bridges

If the npc has calculated a route to take under the bridge, when it approches the bridge it will use the nodes that are above them on the bridge instead of the ones under
Reply
#4

Quote:
Originally Posted by jeffery30162
Посмотреть сообщение
If i use intersection between nodes in calculated path, How do I know when the npc has reached that point to tell him to comtinue to the next?

Thats not even the issue, the issue is bridges

If the npc has calculated a route to take under the bridge, when it approches the bridge it will use the nodes that are above them on the bridge instead of the ones under
The FCNPC plugin uses FCNPC_OnReachDestination for that, and for the bridges, use either ColAndreas or MapAndreas for it, if the Node's Z is more than 1.5 or 2.5m below the Z level use Node Z, else Map Z.
If you fully depend on ColAndreas Bridges and Tunnels are not a problem at all.
Reply
#5

how do I correctly position the vehicle on a hill for it does not appear jumpy when going from pos to pos
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)