/// This is the return value of the <see cref="IRaycastableGraph.Linecast"/> methods.
/// Some members will also be initialized even if nothing was hit, see the individual member descriptions for more info.
///
/// [Open online documentation to see images]
/// </summary>
publicstructGraphHitInfo{
/// <summary>
/// Start of the segment/ray.
/// Note that the point passed to the Linecast method will be clamped to the surface on the navmesh, but it will be identical when seen from above.
/// </summary>
publicVector3origin;
/// <summary>
/// Hit point.
///
/// This is typically a point on the border of the navmesh.
///
/// In case no obstacle was hit then this will be set to the endpoint of the segment.
///
/// If the origin was inside an unwalkable node, then this will be set to the origin point.
/// </summary>
publicVector3point;
/// <summary>
/// Node which contained the edge which was hit.
/// If the linecast did not hit anything then this will be set to the last node along the line's path (the one which contains the endpoint).
///
/// For layered grid graphs the linecast will return true (i.e: no free line of sight) if, when walking the graph, we ended up at the right X,Z coordinate for the end node,
/// but the end node was on a different level (e.g the floor below or above in a building). In this case no node edge was really hit so this field will still be null.
///
/// If the origin was inside an unwalkable node, then this field will be set to that node.
///
/// If no node could be found which contained the origin, then this field will be set to null.
/// </summary>
publicGraphNodenode;
/// <summary>
/// Where the tangent starts. <see cref="tangentOrigin"/> and <see cref="tangent"/> together actually describes the edge which was hit.
/// [Open online documentation to see images]
///
/// If nothing was hit, this will be Vector3.zero.
/// </summary>
publicVector3tangentOrigin;
/// <summary>
/// Tangent of the edge which was hit.
/// [Open online documentation to see images]
///
/// If nothing was hit, this will be Vector3.zero.
/// </summary>
publicVector3tangent;
/// <summary>Distance from <see cref="origin"/> to <see cref="point"/></summary>
/// Determines how to measure distances to the navmesh.
///
/// The default is a euclidean distance, which works well for most things.
/// However, another option is to find nodes which are directly below a point.
/// This is very useful if you have a character, and you want to find the closest node to the character's feet.
/// Then projecting the distance so that we find the closest node as seen from above is a good idea.
///
/// See <see cref="projectionAxis"/> for more info.
///
/// [Open online documentation to see images]
/// The default distance metric is euclidean distance. This is the same as the distance you would measure in 3D space.
/// Shown in the image above are two parts of a navmesh in a side view. One part is colored blue, and one part colored red. Both are walkable.
/// In the background you can see if points are closer to the blue part, or to the red part.
/// You can also see a few query points in black, which show the closest point on the navmesh to that point.
/// The dashed circle around the first query point shows all points which are at the same distance from the query point.
///
/// [Open online documentation to see images]
/// When using <see cref="ClosestAsSeenFromAbove"/>, the distance along the up direction is ignored. You can see this in the image
/// above. Note how all query points find their closest point directly below them.
/// Notice in particular the difference in behavior for the query point on the slope.
///
/// [Open online documentation to see images]
/// When using <see cref="ClosestAsSeenFromAboveSoft"/>, the distance along the up direction is instead scaled by <see cref="distanceScaleAlongProjectionDirection"/> (set to 0.2 by default).
/// This makes it behave almost like <see cref="ClosestAsSeenFromAbove"/>, but it allows small deviations from just looking directly below the query point.
/// The dashed diamond in the image is similarly the set of points equidistant from the query point.
/// This mode is recommended for character movement since it finds points below the agent, but can better handle situations where the agent, for example, steps off a ledge.
/// </summary>
publicstructDistanceMetric{
/// <summary>
/// Normal of the plane on which nodes will be projected before finding the closest point on them.
///
/// When zero, this has no effect.
///
/// When set to the special value (inf, inf, inf) then the graph's natural up direction will be used.
///
/// Often you do not want to find the closest point on a node in 3D space, but rather
/// find for example the closest point on the node directly below the agent.
///
/// This allows you to project the nodes onto a plane before finding the closest point on them.
/// For example, if you set this to Vector3.up, then the nodes will be projected onto the XZ plane.
/// Running a GetNearest query will then find the closest node as seen from above.
///
/// [Open online documentation to see images]
///
/// This is more flexible, however. You can set the <see cref="distanceScaleAlongProjectionDirection"/> to any value (though usually somewhere between 0 and 1).
/// With a value of 0, the closest node will be found as seen from above.
/// When the distance is greater than 0, moving along the projectionAxis from the query point will only cost <see cref="distanceScaleAlongProjectionDirection"/> times the regular distance,
/// but moving sideways will cost the normal amount.
///
/// [Open online documentation to see images]
///
/// A nice value to use is 0.2 for <see cref="distanceScaleAlongProjectionDirection"/>. This will make moving upwards or downwards (along the projection direction)
/// only appear like 20% the original distance to the nearest node search.
/// This allows you to find the closest position directly under the agent, if there is a navmesh directly under the agent, but also to search
/// not directly below the agent if that is necessary.
///
/// Note: This is only supported by some graph types. The navmesh/recast graphs fully support this.
/// The grid graphs, however, only support this if the direction is parallel to the natural 'up' direction of the graph.
/// The grid graphs will search as if the direction is in the graph's up direction if this value is anything other than Vector3.zero.
/// Point graphs do not support this field at all, and will completely ignore it.
///
/// Note: On recast/navmesh graphs there is a performance penalty when using this feature with a direction which is not parallel to the natural up direction of the graph.
/// Typically you should only set it to such values if you have a spherical or non-planar world (see spherical) (view in online documentation for working links).
/// </summary>
publicVector3projectionAxis;
/// <summary>
/// Distance scaling along the <see cref="projectionAxis"/>.
///
/// See: <see cref="projectionAxis"/> for details
/// </summary>
publicfloatdistanceScaleAlongProjectionDirection;
/// <summary>True when using the ClosestAsSeenFromAbove or ClosestAsSeenFromAboveSoft modes</summary>
/// Returns a DistanceMetric which will usually find the closest node as seen from above, but allows some sideways translation if that gives us a node which is significantly closer.
///
/// The "upwards" direction will be set to the graph's natural up direction.
///
/// [Open online documentation to see images]
///
/// See: <see cref="projectionAxis"/>
///
/// Note: This is only supported by some graph types. The navmesh/recast/grid graph fully support this.
/// Point graphs do not support this field at all, and will completely ignore it.
/// Returns a DistanceMetric which will usually find the closest node as seen from above, but allows some sideways translation if that gives us a node which is significantly closer.
///
/// [Open online documentation to see images]
///
/// See: <see cref="projectionAxis"/>
///
/// Note: This is only supported by some graph types. The navmesh/recast graphs fully support this.
/// The grid graphs, however, only support this if the direction is parallel to the natural 'up' direction of the graph.
/// The grid graphs will search as if the direction is in the graph's up direction if this value is anything other than Vector3.zero.
/// Point graphs do not support this field at all, and will completely ignore it.
///
/// Note: On recast/navmesh graphs there is a performance penalty when using this feature with a direction which is not parallel to the natural up direction of the graph.
/// Typically you should only set it to such values if you have a spherical or non-planar world (see spherical) (view in online documentation for working links).
///
/// Note: If you want to use the graph's natural up direction, use the overload which does not take any parameters.
/// </summary>
/// <param name="up">Defines what 'from above' means. Usually this should be the same as the natural up direction of the graph. Does not need to be normalized.</param>
/// Returns a DistanceMetric which will find the closest node as seen from above.
///
/// [Open online documentation to see images]
///
/// See: <see cref="projectionAxis"/>
///
/// Note: This is only supported by some graph types. The navmesh/recast graphs fully support this.
/// The grid graphs, however, only support this if the direction is parallel to the natural 'up' direction of the graph.
/// The grid graphs will search as if the direction is in the graph's up direction if this value is anything other than Vector3.zero.
/// Point graphs do not support this field at all, and will completely ignore it.
///
/// Note: On recast/navmesh graphs there is a performance penalty when using this feature with a direction which is not parallel to the natural up direction of the graph.
/// Typically you should only set it to such values if you have a spherical or non-planar world (see spherical) (view in online documentation for working links).
///
/// Note: If you want to use the graph's natural up direction, use the overload which does not take any parameters.
/// </summary>
/// <param name="up">Defines what 'from above' means. Usually this should be the same as the natural up direction of the graph. Does not need to be normalized.</param>
/// GraphMask mask2 = GraphMask.FromGraphName("My Other Grid Graph");
///
/// NNConstraint nn = NNConstraint.Walkable;
///
/// nn.graphMask = mask1 | mask2;
///
/// // Find the node closest to somePoint which is either in 'My Grid Graph' OR in 'My Other Grid Graph'
/// var info = AstarPath.active.GetNearest(somePoint, nn);
/// </code>
///
/// Note: This does only affect which nodes are returned from a <see cref="AstarPath.GetNearest"/> call, if a valid graph is connected to an invalid graph using a node link then it might be searched anyway.
///
/// See: <see cref="AstarPath.GetNearest"/>
/// See: <see cref="SuitableGraph"/>
/// See: bitmasks (view in online documentation for working links)
/// </summary>
publicGraphMaskgraphMask=-1;
/// <summary>Only treat nodes in the area <see cref="area"/> as suitable. Does not affect anything if <see cref="area"/> is less than 0 (zero)</summary>
publicboolconstrainArea;
/// <summary>Area ID to constrain to. Will not affect anything if less than 0 (zero) or if <see cref="constrainArea"/> is false</summary>
publicintarea=-1;
/// <summary>
/// Determines how to measure distances to the navmesh.
///
/// The default is a euclidean distance, which works well for most things.
///
/// See: <see cref="DistanceMetric"/>
/// </summary>
publicDistanceMetricdistanceMetric;
/// <summary>Constrain the search to only walkable or unwalkable nodes depending on <see cref="walkable"/>.</summary>
publicboolconstrainWalkability=true;
/// <summary>
/// Only search for walkable or unwalkable nodes if <see cref="constrainWalkability"/> is enabled.
/// If true, only walkable nodes will be searched for, otherwise only unwalkable nodes will be searched for.
/// Does not affect anything if <see cref="constrainWalkability"/> if false.
/// </summary>
publicboolwalkable=true;
/// <summary>
/// if available, do an XZ check instead of checking on all axes.
/// The navmesh/recast graph as well as the grid/layered grid graph supports this.
///
/// This can be important on sloped surfaces. See the image below in which the closest point for each blue point is queried for:
/// [Open online documentation to see images]
///
/// Deprecated: Use <see cref="distanceMetric"/> = DistanceMetric.ClosestAsSeenFromAbove() instead
/// This NNConstraint has settings which works for most, it only finds walkable nodes
/// and it constrains distance set by A* Inspector -> Settings -> Max Nearest Node Distance
///
/// Deprecated: Use <see cref="NNConstraint.Walkable"/> instead. It is equivalent, but the name is more descriptive.
/// </summary>
[System.Obsolete("Use NNConstraint.Walkable instead. It is equivalent, but the name is more descriptive")]
publicstaticNNConstraintDefault{
get{
returnnewNNConstraint();
}
}
/// <summary>
/// An NNConstraint which filters out unwalkable nodes.
/// This is the most commonly used NNConstraint.
///
/// It also constrains the nearest node to be within the distance set by A* Inspector -> Settings -> Max Nearest Node Distance
/// </summary>
publicstaticNNConstraintWalkable{
get{
returnnewNNConstraint();
}
}
/// <summary>Returns a constraint which does not filter the results</summary>
publicstaticNNConstraintNone{
get{
returnnewNNConstraint{
constrainWalkability=false,
constrainArea=false,
constrainTags=false,
constrainDistance=false,
graphMask=-1,
};
}
}
/// <summary>Default constructor. Equals to the property <see cref="Default"/></summary>
publicNNConstraint(){
}
}
/// <summary>
/// A special NNConstraint which can use different logic for the start node and end node in a path.
/// A PathNNConstraint can be assigned to the Path.nnConstraint field, the path will first search for the start node, then it will call <see cref="SetStart"/> and proceed with searching for the end node (nodes in the case of a MultiTargetPath).
/// The default PathNNConstraint will constrain the end point to lie inside the same area as the start point.
/// </summary>
publicclassPathNNConstraint:NNConstraint{
publicstaticnewPathNNConstraintWalkable{
get{
returnnewPathNNConstraint{
constrainArea=true
};
}
}
/// <summary>Called after the start node has been found. This is used to get different search logic for the start and end nodes in a path</summary>
publicvirtualvoidSetStart(GraphNodenode){
if(node!=null){
area=(int)node.Area;
}else{
constrainArea=false;
}
}
}
/// <summary>
/// Result of a nearest node query.
///
/// See: <see cref="AstarPath.GetNearest"/>
/// </summary>
publicreadonlystructNNInfo{
/// <summary>
/// Closest node.
/// May be null if there was no node which satisfied all constraints of the search.
/// </summary>
publicreadonlyGraphNodenode;
/// <summary>
/// Closest point on the navmesh.
/// This is the query position clamped to the closest point on the <see cref="node"/>.
///
/// If node is null, then this value is (+inf, +inf, +inf).
/// </summary>
publicreadonlyVector3position;
/// <summary>
/// Cost for picking this node as the closest node.
/// This is typically the squared distance from the query point to <see cref="position"/>.
///
/// However, it may be different if the <see cref="NNConstraint"/> used a different cost function.
/// For example, if <see cref="NNConstraint.distanceMetric"/> is <see cref="DistanceMetric.ClosestAsSeenFromAbove()"/>,
/// then this value will be the squared distance in the XZ plane.
///
/// This value is not guaranteed to be smaller or equal to the squared euclidean distance from the query point to <see cref="position"/>.
/// In particular for a navmesh/recast graph with a <see cref="DistanceMetric.ClosestAsSeenFromAboveSoft"/> NNConstraint it may
/// be slightly greater for some configurations. This is fine because we are only using this value for the rough
/// distance limit performanced by <see cref="AstarPath.maxNearestNodeDistance"/>, and it's not a problem if it is slightly inaccurate.
s+="Pre-processing graph "+(graphIndex+1)+" of "+graphCount;
break;
caseScanningStage.ScanningGraph:
s+="Scanning graph "+(graphIndex+1)+" of "+graphCount;
break;
caseScanningStage.PostProcessingGraph:
s+="Post-processing graph "+(graphIndex+1)+" of "+graphCount;
break;
caseScanningStage.FinishingScans:
s+="Finalizing graph scans";
break;
}
returns;
}
}
/// <summary>Graphs which can be updated during runtime</summary>
publicinterfaceIUpdatableGraph{
/// <summary>
/// Schedules a number of graph updates.
///
/// This method should return a promise. It should not execute the graph updates immediately.
/// The Apply method on the promise will be called when the graph updates should be applied.
/// In the meantime, the graph may perform calculations using e.g. the unity job system.
///
/// Notes to implementators.
/// This function should (in order):
/// -# Call o.WillUpdateNode on the GUO for every node it will update, it is important that this is called BEFORE any changes are made to the nodes.
/// -# Update walkabilty using special settings such as the usePhysics flag used with the GridGraph.
/// -# Call Apply on the GUO for every node which should be updated with the GUO.
/// -# Update connectivity info if appropriate (GridGraphs updates connectivity, but most other graphs don't since then the connectivity cannot be recovered later).
///
/// It is guaranteed that the Apply function will be called on the returned promise before this function is called again.
///
/// Null may be returned if no updates need to be done to the graph.
/// <summary>Info about if a graph update has been applied or not</summary>
publicenumGraphUpdateStage{
/// <summary>
/// The graph update object has been created, but not used for anything yet.
/// This is the default value.
/// </summary>
Created,
/// <summary>The graph update has been sent to the pathfinding system and is scheduled to be applied to the graphs</summary>
Pending,
/// <summary>The graph update has been applied to all graphs</summary>
Applied,
/// <summary>
/// The graph update has been aborted and will not be applied.
/// This can happen if the AstarPath component is destroyed while a graph update is queued to be applied.
/// </summary>
Aborted,
}
/// <summary>
/// Represents a collection of settings used to update nodes in a specific region of a graph.
/// See: AstarPath.UpdateGraphs
/// See: graph-updates (view in online documentation for working links)
/// </summary>
publicclassGraphUpdateObject{
/// <summary>
/// The bounds to update nodes within.
/// Defined in world space.
/// </summary>
publicBoundsbounds;
/// <summary>
/// Use physics checks to update nodes.
/// When updating a grid graph and this is true, the nodes' position and walkability will be updated using physics checks
/// with settings from "Collision Testing" and "Height Testing".
///
/// When updating a PointGraph, setting this to true will make it re-evaluate all connections in the graph which passes through the <see cref="bounds"/>.
///
/// This has no effect when updating GridGraphs if <see cref="modifyWalkability"/> is turned on.
/// You should not combine <see cref="updatePhysics"/> and <see cref="modifyWalkability"/>.
///
/// On RecastGraphs, having this enabled will trigger a complete recalculation of all tiles intersecting the bounds.
/// This is quite slow (but powerful). If you only want to update e.g penalty on existing nodes, leave it disabled.
/// </summary>
publicboolupdatePhysics=true;
/// <summary>
/// Reset penalties to their initial values when updating grid graphs and <see cref="updatePhysics"/> is true.
/// If you want to keep old penalties even when you update the graph you may want to disable this option.
///
/// The images below shows two overlapping graph update objects, the right one happened to be applied before the left one. They both have updatePhysics = true and are
/// set to increase the penalty of the nodes by some amount.
///
/// The first image shows the result when resetPenaltyOnPhysics is false. Both penalties are added correctly.
/// [Open online documentation to see images]
///
/// This second image shows when resetPenaltyOnPhysics is set to true. The first GUO is applied correctly, but then the second one (the left one) is applied
/// and during its updating, it resets the penalties first and then adds penalty to the nodes. The result is that the penalties from both GUOs are not added together.
/// The green patch in at the border is there because physics recalculation (recalculation of the position of the node, checking for obstacles etc.) affects a slightly larger
/// area than the original GUO bounds because of the Grid Graph -> Collision Testing -> Diameter setting (it is enlarged by that value). So some extra nodes have their penalties reset.
///
/// [Open online documentation to see images]
///
/// Bug: Not working with burst
/// </summary>
publicboolresetPenaltyOnPhysics=true;
/// <summary>
/// Update Erosion for GridGraphs.
/// When enabled, erosion will be recalculated for grid graphs
/// after the GUO has been applied.
///
/// In the below image you can see the different effects you can get with the different values.
/// The first image shows the graph when no GUO has been applied. The blue box is not identified as an obstacle by the graph, the reason
/// there are unwalkable nodes around it is because there is a height difference (nodes are placed on top of the box) so erosion will be applied (an erosion value of 2 is used in this graph).
/// The orange box is identified as an obstacle, so the area of unwalkable nodes around it is a bit larger since both erosion and collision has made
/// nodes unwalkable.
/// The GUO used simply sets walkability to true, i.e making all nodes walkable.
///
/// [Open online documentation to see images]
///
/// When updateErosion=True, the reason the blue box still has unwalkable nodes around it is because there is still a height difference
/// so erosion will still be applied. The orange box on the other hand has no height difference and all nodes are set to walkable.
///
/// When updateErosion=False, all nodes walkability are simply set to be walkable in this example.
///
/// See: Pathfinding.GridGraph
///
/// Bug: Not working with burst
/// </summary>
publicboolupdateErosion=true;
/// <summary>
/// NNConstraint to use.
/// The Pathfinding.NNConstraint.SuitableGraph function will be called on the NNConstraint to enable filtering of which graphs to update.
/// Note: As the Pathfinding.NNConstraint.SuitableGraph function is A* Pathfinding Project Pro only, this variable doesn't really affect anything in the free version.
/// </summary>
publicNNConstraintnnConstraint=NNConstraint.None;
/// <summary>
/// Penalty to add to the nodes.
/// A penalty of 1000 is equivalent to the cost of moving 1 world unit.
/// </summary>
publicintaddPenalty;
/// <summary>
/// If true, all nodes' walkable variable will be set to <see cref="setWalkability"/>.
/// It is not recommended to combine this with <see cref="updatePhysics"/> since then you will just overwrite
/// what <see cref="updatePhysics"/> calculated.
/// </summary>
publicboolmodifyWalkability;
/// <summary>If <see cref="modifyWalkability"/> is true, the nodes' walkable variable will be set to this value</summary>
publicboolsetWalkability;
/// <summary>If true, all nodes' tag will be set to <see cref="setTag"/></summary>
publicboolmodifyTag;
/// <summary>If <see cref="modifyTag"/> is true, all nodes' tag will be set to this value</summary>
publicPathfindingTagsetTag;
/// <summary>
/// Track which nodes are changed and save backup data.
/// Used internally to revert changes if needed.
///
/// Deprecated: This field does not do anything anymore. Use <see cref="AstarPath.Snapshot"/> instead.
/// </summary>
[System.Obsolete("This field does not do anything anymore. Use AstarPath.Snapshot instead.")]
publicbooltrackChangedNodes;
/// <summary>
/// A shape can be specified if a bounds object does not give enough precision.
/// Note that if you set this, you should set the bounds so that it encloses the shape
/// because the bounds will be used as an initial fast check for which nodes that should
/// be updated.
/// </summary>
publicGraphUpdateShapeshape;
/// <summary>
/// Info about if a graph update has been applied or not.
/// Either an enum (see STAGE_CREATED and associated constants)
/// or a non-negative count of the number of graphs that are waiting to apply this graph update.
/// </summary>
internalintinternalStage=STAGE_CREATED;
internalconstintSTAGE_CREATED=-1;
internalconstintSTAGE_PENDING=-2;
internalconstintSTAGE_ABORTED=-3;
internalconstintSTAGE_APPLIED=0;
/// <summary>Info about if a graph update has been applied or not</summary>
publicGraphUpdateStagestage{
get{
switch(internalStage){
caseSTAGE_CREATED:
returnGraphUpdateStage.Created;
caseSTAGE_APPLIED:
returnGraphUpdateStage.Applied;
caseSTAGE_ABORTED:
returnGraphUpdateStage.Aborted;
// Positive numbers means it is currently being applied, so it is also pending.
default:
caseSTAGE_PENDING:
returnGraphUpdateStage.Pending;
}
}
}
/// <summary>Should be called on every node which is updated with this GUO before it is updated.</summary>
/// <param name="node">The node to save fields for. If null, nothing will be done</param>
publicvirtualvoidWillUpdateNode(GraphNodenode){
}
/// <summary>
/// Reverts penalties and flags (which includes walkability) on every node which was updated using this GUO.
/// Data for reversion is only saved if <see cref="trackChangedNodes"/> is true.
///
/// See: blocking (view in online documentation for working links)
/// Checks if the straight line of sight between the two points on the graph is obstructed.
///
/// Returns: True if an obstacle was hit, and false otherwise.
/// </summary>
/// <param name="start">The start point of the raycast.</param>
/// <param name="end">The end point of the raycast.</param>
/// <param name="startNodeHint">If you know which node contains the start point, you may pass it here to save a GetNearest call. Otherwise, pass null. If the start point is not actually inside the give node, you may get different behavior on different graph types. Some will clamp the start point to the surface of the hint node, and some will ignore the hint parameter completely.</param>
/// <param name="hit">Additional information about what was hit.</param>
/// <param name="trace">If you supply a list, it will be filled with all nodes that the linecast traversed. You may pass null if you don't care about this.</param>
/// <param name="filter">You may supply a callback to indicate which nodes should be considered unwalkable. Note that already unwalkable nodes cannot be made walkable in this way.</param>
/// Checks if the straight line of sight between the two points on the graph is obstructed.
///
/// Returns: True if an obstacle was hit, and false otherwise.
/// </summary>
/// <param name="start">The start point of the raycast.</param>
/// <param name="end">The end point of the raycast.</param>
/// <param name="hit">Additional information about what was hit.</param>
/// <param name="trace">If you supply a list, it will be filled with all nodes that the linecast traversed. You may pass null if you don't care about this.</param>
/// <param name="filter">You may supply a callback to indicate which nodes should be considered unwalkable. Note that already unwalkable nodes cannot be made walkable in this way.</param>
/// Manhattan distance, but allowing diagonal movement as well.
/// Note: This option is currently hard coded for the XZ plane. It will be equivalent to Manhattan distance if you try to use it in the XY plane (i.e for a 2D game).
/// This reduces the pathfinding algorithm to Dijkstra's algorithm.
/// This is usually significantly slower compared to using a heuristic, which is why the A* algorithm is usually preferred over Dijkstra's algorithm.
/// You may have to use this if you have a very non-standard graph. For example a world with a <a href="https://en.wikipedia.org/wiki/Wraparound_(video_games)">wraparound playfield</a> (think Civilization or Asteroids) and you have custom links
/// with a zero cost from one end of the map to the other end. Usually the A* algorithm wouldn't find the wraparound links because it wouldn't think to look in that direction.
/// <summary>What to do when the character is close to the destination</summary>
publicenumCloseToDestinationMode{
/// <summary>The character will stop as quickly as possible when within endReachedDistance (field that exist on most movement scripts) units from the destination</summary>
Stop,
/// <summary>The character will continue to the exact position of the destination</summary>
ContinueToExactDestination,
}
/// <summary>Indicates the side of a line that a point lies on</summary>
publicenumSide:byte{
/// <summary>The point lies exactly on the line</summary>
Colinear=0,
/// <summary>The point lies on the left side of the line</summary>
Left=1,
/// <summary>The point lies on the right side of the line</summary>
Right=2
}
publicenumInspectorGridHexagonNodeSize{
/// <summary>Value is the distance between two opposing sides in the hexagon</summary>
Width,
/// <summary>Value is the distance between two opposing vertices in the hexagon</summary>
Diameter,
/// <summary>Value is the raw node size of the grid</summary>
NodeSize
}
publicenumInspectorGridMode{
Grid,
IsometricGrid,
Hexagonal,
Advanced
}
/// <summary>
/// Determines which direction the agent moves in.
/// For 3D games you most likely want the ZAxisIsForward option as that is the convention for 3D games.
/// For 2D games you most likely want the YAxisIsForward option as that is the convention for 2D games.