Skip to content

Conversation

@suedeworthey
Copy link

Added Nav Path Filter to verify path doesn't go outside boundary set by searchradius and searchstartpos.

@suedeworthey suedeworthey force-pushed the jimbob-nav-path-filter branch from ebcd462 to a206701 Compare May 29, 2024 18:53
@suedeworthey
Copy link
Author

Squashed commits.

Copy link
Owner

@brainiac brainiac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't look like the filter's params are being populated.

PluginAPI.h Outdated
bool track = true; // if spawn is to be tracked
FacingType facing = FacingType::Forward; // Forward = normal, Backward = move along path facing backward.
int searchradius = 0; // the max search radius of the path
glm::vec3 searchstartpos; // the starting position of the search
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

searchStartPos

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or searchOrigin... (see below comment)

PluginAPI.h Outdated
bool paused = false; // pathing is paused
bool track = true; // if spawn is to be tracked
FacingType facing = FacingType::Forward; // Forward = normal, Backward = move along path facing backward.
int searchradius = 0; // the max search radius of the path
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

searchRadius

{
options.searchradius = GetIntFromString(value, 0);
}
else if (key == "searchstartpos")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking that "searchorigin" might be better.

Comment on lines 67 to 72
inline NavPathFilter() { };
inline virtual ~NavPathFilter() override { };
virtual bool passFilter(const dtPolyRef ref, const dtMeshTile* tile, const dtPoly* poly) const override;
inline void SetSearchRadius(int radius) { m_searchRadius = radius; }
inline int GetSearchRadius() const { return m_searchRadius; }
inline void SetStartPos(const glm::vec3& pos) { m_startPos = pos; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline isn't necessary to specify on implementations in the class definition

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these options aren't being set anywhere.

@suedeworthey suedeworthey force-pushed the jimbob-nav-path-filter branch from f8a6fd0 to c42f6e7 Compare June 24, 2024 19:51
Updated Nav path filter to check if path would go outside boundary set by camp radius to improve pulling.
Added start position for nav filter to ensure it doesn't follow the player.
@suedeworthey suedeworthey force-pushed the jimbob-nav-path-filter branch from c42f6e7 to a3fbec0 Compare February 14, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants