You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I picked up the SharpNav only some time ago and I have little insight in what's going on, but I think I found a bug that prevented my agent from travelling over an OffMeshConnection.
The first while loop in PathCorridor.MoveOverOffMeshConnection sets the local variables PolyId prevRef and PolyId polyRef.
Before the first iteration the variables have the following values:
prevRef = PolyId.Null
polyRef = path[0]
After first iteration:
prevRef = path[0]
polyRef = path[0]
After second iteration:
prevRef = path[0]
polyRef = path[1]
The problem is, that the npos variable needs to be incremented before setting the new value to polyRef, so prevRef and polyRef do not have the same value after the first iteration.
I picked up the SharpNav only some time ago and I have little insight in what's going on, but I think I found a bug that prevented my agent from travelling over an OffMeshConnection.
The first while loop in PathCorridor.MoveOverOffMeshConnection sets the local variables
PolyId prevRef
andPolyId polyRef
.Before the first iteration the variables have the following values:
prevRef = PolyId.Null
polyRef = path[0]
After first iteration:
prevRef = path[0]
polyRef = path[0]
After second iteration:
prevRef = path[0]
polyRef = path[1]
The problem is, that the npos variable needs to be incremented before setting the new value to polyRef, so prevRef and polyRef do not have the same value after the first iteration.
EDIT: PullRequest: #56
The text was updated successfully, but these errors were encountered: