Метод | Описание | |
---|---|---|
IsInLineOfSight ( Vector3 position1, Vector3 position2, PositionedObjectList |
Tests if two vector positions are within line of sight given a collision map.
|
|
IsInLineOfSight ( Vector3 position1, Vector3 position2, float collisionThreshold, PositionedObjectList |
Tests if two vector positions are within line of sight given a collision map.
|
|
IsInLineOfSight ( Vector3 position1, Vector3 position2, float collisionThreshold, ShapeCollection shapeCollection ) : bool | ||
Midpoint ( Vector3 position1, Vector3 position2 ) : Vector3 |
Returns the midpoint between two Vector3s.
|
|
OptimalVisiblePoint ( Vector3 currentPosition, Vector3 inSightPosition, Vector3 outOfSightPosition, int numberOfOptimizations, float collisionThreshold, PositionedObjectList |
Calculates the closest visible point to outOfSightPosition given the currentPosition.
|
public static IsInLineOfSight ( Vector3 position1, Vector3 position2, PositionedObjectList |
||
position1 | Vector3 | The first world-coordinate position. |
position2 | Vector3 | The second world-coordinate position. |
collisionMap | PositionedObjectList |
The list of polygons used to test if the two positions are within line of sight. |
Результат | bool |
public static IsInLineOfSight ( Vector3 position1, Vector3 position2, float collisionThreshold, PositionedObjectList |
||
position1 | Vector3 | The first world-coordinate position. |
position2 | Vector3 | The second world-coordinate position. |
collisionThreshold | float | Distance from position2 to the polygon it's colliding against. /// If a polygon is within this threshold, this will return false. |
collisionMap | PositionedObjectList |
The list of polygons used to test if the two positions are within line of sight. |
Результат | bool |
public static IsInLineOfSight ( Vector3 position1, Vector3 position2, float collisionThreshold, ShapeCollection shapeCollection ) : bool | ||
position1 | Vector3 | |
position2 | Vector3 | |
collisionThreshold | float | |
shapeCollection | ShapeCollection | |
Результат | bool |
public static Midpoint ( Vector3 position1, Vector3 position2 ) : Vector3 | ||
position1 | Vector3 | The first position. |
position2 | Vector3 | The connecting position. |
Результат | Vector3 |
public static OptimalVisiblePoint ( Vector3 currentPosition, Vector3 inSightPosition, Vector3 outOfSightPosition, int numberOfOptimizations, float collisionThreshold, PositionedObjectList |
||
currentPosition | Vector3 | The position with which to test Line Of Sight |
inSightPosition | Vector3 | The connector to the outOfSightPosition with which to find midpoint optimizations. |
outOfSightPosition | Vector3 | The guide to find the optimal in sight position. |
numberOfOptimizations | int | The number of times we will midpoint optimize, higher means closer to optimal. |
collisionThreshold | float | Usually the object using the path will be larger than 0, use the size of the collision for testing line of sight. |
collisionMap | PositionedObjectList |
Polygon list which we will use for collision (without it, everything is straight line of sight). |
Результат | Vector3 |