Want to use the find path node to create a route. Then when the path overlaps a trigger volume it adds the volume to an array.
Is this possible without having actor follow the path to trigger overlaps
Want to use the find path node to create a route. Then when the path overlaps a trigger volume it adds the volume to an array.
Is this possible without having actor follow the path to trigger overlaps
To clarify, say I have a map of a town. I then use find path from home to the public park. I want to know if the path passes the library or the general store.
That is what I’m trying to do
Maybe see
// Engine/Source/Runtime/NavigationSystem/Private/NavigationSystem.cpp:1625
UNavigationPath* GeneratedPath = FindPathToLocationSynchronously(WorldContextObject, PathStart, NavAgent ? NavAgent->GetNavAgentLocation() : GoalActor->GetActorLocation(), PathfindingContext, FilterClass);
as an example.
In UNavigationPath
you can see TArray<FVector> PathPoints;
member, and you can check overlapping for each path point with your trigger volume. For example, use Line Trace to check whether the path line is inserting with trigger volume, or use CapsuleOverlap to check …
I like it.
However, if I remember correctly, path points are only at the beginning and end of splines which maked the entire path. What a about trigger volumes that are in the middle of a spline? There would be no path points there.
I guess I run overlap checks every X distance along the entire path