-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hi,
I would like to be able to create custom logic for the QueryFilter, especially passFilter/getCost, is it possible that this class gets fully exposed? Rough example below.. If I do this now, passFilter does not get called.
On https://recastnav.com/classdtQueryFilter.html is mentioned "DT_VIRTUAL_QUERYFILTER must be defined in order to extend this class."
class CustomFilter extends QueryFilter {
constructor() {
super();
}
passFilter(polyRef: number, tile: any, poly: any): boolean {
console.log(polyRef, tile, poly)
if (poly.get_area() === 63) {
return false;
}
return poly.get_flags() !== 0;
//return (poly->flags & m_includeFlags) != 0 && (poly->flags & m_excludeFlags) == 0;
//return super.passFilter(polyRef, tile, poly);
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels