Skip to content

What does TOOLMODE_PATHFIND_FOLLOW do with m_smoothPath? #700

Answered by cadop
cadop asked this question in Q&A
Discussion options

You must be logged in to vote

I spent some more time stepping through and found that there is some issue with edges being detected in getPolyHeight. I think during the check to see if it is in the polygon or not, "edge cases" cause it to return false incorrectly. There is a check at the end for a point on edges, but it doesn't reach that.

So instead I modified

if (!dtPointInPolygon(pos, verts, nv))
and it works without the weird edge problem.

	if (!dtPointInPolygon(pos, verts, nv))
	{
		// The point is not in the poly, but it might be on the edge
		float closest[3];
		closestPointOnDetailEdges<true>(tile, poly, pos, closest);
		if (c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cadop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant