Jump to content

Ped move tracking


Recommended Posts

Hello! I'm making my ped system (pathfinding, walking, etc..). For example I have ped, and I have destination point, a set ped's vector and let him walk to the destination point. But how to track if ped came in destination point? Calculate destination, walk speed and calculate approximate walk time, then start a timer and then call an event like (onPedReachPoint)? Or there are other methods? What if player attack bot, while the last will be walking? Maybe it is exists some universal 3D games npc algorithm?

Link to comment

How do you know when you arrive at some destination? Do you calculate the distance in the beginning and then count down while walking? I doubt it, I think you're aware of the distance all the time and only stop when you see that you have arrived at the destination. So peds should work the same way, they must continuously check their position and see if they have arrived or not.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...