Jump to content

Closest with Pathfinding?


Recommended Posts

Posted (edited)

Hey all,

objects.closest uses linear distance to calculate the closest object, is there a way to find the closest walkable object using pathfinding? (Ex. collisionable objects makes the distance by walking longer than linear distance)

Couldn't find anything in the api.

Edited by Trees
Posted

Keep in mind this will be much more expensive.

Yeah, but how does it work? Is it using A*? Because I imagine that the pathfinding is calculated client sided when you issue a movement order, which could potentially be done by hooking the callback and getting the path and then not sending it to the server.

  • Like 2
Posted

Yeah, but how does it work? Is it using A*? Because I imagine that the pathfinding is calculated client sided when you issue a movement order, which could potentially be done by hooking the callback and getting the path and then not sending it to the server.

 

I don't see how this is faster, since it's the difference between locally calculating a path using whichever pathfinding algorithm the OSB team has implemented, and locally calculating a path using whichever pathfinding algorithm Jagex has implemented.

Posted

I don't see how this is faster, since it's the difference between locally calculating a path using whichever pathfinding algorithm the OSB team has implemented, and locally calculating a path using whichever pathfinding algorithm Jagex has implemented.

 

Faster, no, but it would be useful in that is would be the exact path your character is going to follow before walking.

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...