Enable custom blocked checking (Stucked checking) to determine if the Agent is stucked VIA collisions.
How long the Agent has to be at one position to be considred "Blocked"
The InstanceThatBlocked is only available if BlockedRaycastParams is set or OptimizeWithRaycast is enabled and
the resulting path was generated through Raycast.
You may wish to Compute again whenever the path gets blocked, You can do this by just simply calling the Compute method.
However you should always check that the blocked index was not already traversed, to prevent an unnecessary recomputation.
ComputedPath.Blocked.Connect((WaypointIndex) => {
if(ComputedPath.GetCurrentWaypointIndex() < WaypointIndex) {
ComputedPath.ComputeFromCurrent();
}
})
Fired whenever the Compute method is called.
Fired whenever the path fails.
Will continue to follow the destination while this property is true. Whenever the destinations position changes it will recompute.
Use the FollowDestinationMagnitude property to set when change is detected
The difference of which the current position has to be from the previous position. e.g. if 10, the agent will have to
move 10 studs away from their last position for recomputation to happen.
Since the agent can now move within this magnitude without being detected, there may be cases where the Agent will stop a fair distance away from the current destination ( it will stop at the last known destination within the magnitude ). To combat this, you can implement you own recomputation logic whenever a computation as completed.
ComputedPath.Completed.Connect((reached,noWaypoints) => {
if(noWaypoints) {
retun;
}
if(ComputedPath.GetAgentVector().sub(ComputedPath.GetDestinationVector()).Magnitude > 5) {
ComputedPath.Compute();
}
}))
Fired whenever the path is computed and the internal Move() function is called.
BetaSkipAny waypoint that is behind the agent will be ignored.
Fired whenever a Waypoint is reached.
OptionalStartVector: ValidAgentAndDestinationsOptionalEndVector: ValidAgentAndDestinationsOptionalStartIndex: numberuses GetVector3FromItem to get Agents position
Gets the first waypoint from the index provided
OptionalForwards: booleanWill go from Index++ instead of Index--
OptionalAction: PathWaypointAction
TweenInfo in cases where
Agentis not a Humanoid Character.