Question: create a path planning alogrithm in c# for a unity game that avoids obstacles implement it into the function below code : / / Student
create a path planning alogrithm in c# for a unity game that avoids obstacles implement it into the function below code :
Student code to build the path network from the given pathNodes and Obstacles
Obstacles
List of obstacles on the plane
agentRadius
the radius of the traversing agent
minPoVDist AND maxPoVDist
used for Points of Visibility
see assignment doc
pathNodes
ref parameter that contains the pathNodes to connect
or return if pathNetworkMode is set to PointsOfVisibility
pathEdges
out parameter that will contain the edges you build.
Edges cannot intersect with obstacles or boundaries. Edges must be at least agentRadius distance
from all obstacle
boundary line segments. No self edges, duplicate edges. No null lists
but can be empty
pathNetworkMode
enum that specifies PathNetwork type
see assignment doc
public static void Create
Vector
canvasOrigin float canvasWidth, float canvasHeight,
List obstacles, float agentRadius, float minPoVDist, float maxPoVDist, ref List pathNodes, out List
pathEdges
PathNetworkMode pathNetworkMode
STUDENT CODE HERE
pathEdges
new List
pathNodes
Count
;
for
int i
; i
pathNodesCount;
i
pathEges.Add
new List
;
END STUDENT CODE
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
