DPB2Class ยท Navigation

ExilePather

Query routes and path distances in the current area. Route calculation and issuing movement commands are separate operations.

Namespace: DreamPoeBot.Loki.Bot.Pathfinding

public static class ExilePatherView DPB1 version โ†’

Examples

Imports used by these examples
using System;
using System.Linq;
using DreamPoeBot.Loki.Game;
using DreamPoeBot.Loki.Game.Objects;
using DreamPoeBot.Loki.Bot;
using DreamPoeBot.Loki.Bot.Pathfinding;
using DreamPoeBot.Loki.Common;

Measure the route to a transition

if (!LokiPoe.IsInGame)
    return;

var target = LokiPoe.ObjectManager.GetObjectsByType<AreaTransition>()
    .FirstOrDefault(obj => obj.IsTargetable);
if (target != null)
{
    var distance = ExilePather.PathDistance(LokiPoe.MyPosition, target.Position);
}

A path measurement is not a movement command. Recheck the target before moving.

Members and overloads

1 results
Show all members

Raycast

MethodLink โ†—
public static bool ExilePather.Raycast(Vector2i start, Vector2i end, out Vector2i hitPoint, bool dontLeaveFrame = false, bool shouldUseRangedMap = false)

Project a ray from start to end, if the ray encounter a non walkable location or an obstacle, it return false and out the location of the obstacle as hitpoint. This function do not consider dynamic objects (object collected with Objectmanager, like doors, chests, monsters etc).

startVector2i
The start position of the ray.
endVector2i
The end Position of the ray.
hitPointVector2i
If the function return false, hitpoint is set to the first non walkable position.
dontLeaveFramebool
Not read by this overload in the reviewed source. Do not rely on this argument to change its behavior.
shouldUseRangedMapbool
Should the function evaluate the Ranged map instead of the Walk map? use this for spells or arrows.

Returns: Return true if the function do not encounter any obstacle, or false if a obstacle is encountered.

This function also Broadcast a message with id "Raycast_Result" and has 4 parms as input: Vector2i start, Vector2i end, bool Returnvalue, Vector2i hitPoint. If ground map is used, detour's raycast is used which is generally a lot faster.

Related types

DPB2 0.4.5.88 ยท Reference reviewed 2026-10-02. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.