Carcade Posted May 1, 2014 Share Posted May 1, 2014 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
DiSaMe Posted May 1, 2014 Share Posted May 1, 2014 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
Carcade Posted May 2, 2014 Author Share Posted May 2, 2014 Ok, thank you. Will do this way. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now