Drag[en]gine Script Module DragonScript
1.21
|
Public Member Functions | |
Constructors | |
Navigator | new () |
Create navigator. More... | |
Management | |
int | getLayer () |
Layer number. More... | |
void | setLayer (int layer) |
Set layer number. More... | |
NavigationSpaceType | getSpaceType () |
Space type to navigate. More... | |
void | setSpaceType (NavigationSpaceType spaceType) |
Set space type to navigate. More... | |
float | getMaxOutsideDistance () |
Maximum distance the start and goal point are allowed to be outside any navigation space. More... | |
void | setMaxOutsideDistance (float maxDistance) |
Set maximum distance the start and goal point are allowed to be outside any navigation space. More... | |
float | getDefaultFixCost () |
Fix cost to use if no matching type is found. More... | |
void | setDefaultFixCost (float cost) |
Set fix cost to use if no matching type is found. More... | |
float | getDefaultCostPerMeter () |
Cost per meter to use if no matching type is found. More... | |
void | setDefaultCostPerMeter (float costPerMeter) |
Set cost per meter to use if no matching type is found. More... | |
float | getBlockingCost () |
Maximum cost beyond which a node or path is considered impassable. More... | |
void | setBlockingCost (float cost) |
Set maximum cost beyond which a node or path is considered impassable. More... | |
float | getTypeFixCost (int type) |
Fix cost for type or default fix cost if not found. More... | |
void | setTypeFixCost (int type, float fixCost) |
Set fix cost for type or default fix cost if not found. More... | |
float | getTypeCostPerMeter (int type) |
Cost per meter for type or default cost per meter if not found. More... | |
void | setTypeCostPerMeter (int type, float costPerMeter) |
Set cost per meter for type or default cost per meter if not found. More... | |
void | removeType (int type) |
Remove type. More... | |
void | removeAllTypes () |
Remove all types. More... | |
void | findPath (NavigatorPath path, DVector start, DVector goal) |
Find path. More... | |
NavigationInfo | nearestPoint (DVector point, float radius) |
Nearest point on nearest navigation space. More... | |
NavigationInfo | lineCollide (DVector origin, Vector direction) |
Distance moving from point along direction before crossing navigation space boundaries. More... | |
NavigationInfo | pathCollideRay (NavigatorPath path, Collider collider) |
Test path for collision using ray test against collider. More... | |
NavigationInfo | pathCollideRay (NavigatorPath path, Collider collider, DVector startPosition, int nextPoint, float maxDistance) |
Test path for collision using ray test against collider inside range. More... | |
NavigationInfo | pathCollideShape (NavigatorPath path, Collider collider, Collider agent) |
Test path for collision using an agent collider moved along the path against a collider. More... | |
NavigationInfo | pathCollideShape (NavigatorPath path, Collider collider, Collider agent, DVector startPosition, int nextPoint, float maxDistance) |
Test path for collision using an agent collider moved along the path against a collider inside range. More... | |
This is a native class.
void Dragengine.Scenery.Navigator.findPath | ( | NavigatorPath | path, |
DVector | start, | ||
DVector | goal | ||
) |
Find path.
Replaces path with found path. If path can not be found the path is empty.
float Dragengine.Scenery.Navigator.getBlockingCost | ( | ) |
Maximum cost beyond which a node or path is considered impassable.
float Dragengine.Scenery.Navigator.getDefaultCostPerMeter | ( | ) |
Cost per meter to use if no matching type is found.
float Dragengine.Scenery.Navigator.getDefaultFixCost | ( | ) |
Fix cost to use if no matching type is found.
int Dragengine.Scenery.Navigator.getLayer | ( | ) |
Layer number.
float Dragengine.Scenery.Navigator.getMaxOutsideDistance | ( | ) |
Maximum distance the start and goal point are allowed to be outside any navigation space.
If the start or goal point is outside the range path update returns an empty path. The default disstance is 0.5m .
NavigationSpaceType Dragengine.Scenery.Navigator.getSpaceType | ( | ) |
Space type to navigate.
float Dragengine.Scenery.Navigator.getTypeCostPerMeter | ( | int | type | ) |
Cost per meter for type or default cost per meter if not found.
float Dragengine.Scenery.Navigator.getTypeFixCost | ( | int | type | ) |
Fix cost for type or default fix cost if not found.
NavigationInfo Dragengine.Scenery.Navigator.lineCollide | ( | DVector | origin, |
Vector | direction | ||
) |
Distance moving from point along direction before crossing navigation space boundaries.
origin | Origin to start moving. Use NearestPoint() to make sure it is located on a navigation space. |
direction | Direction to move starting at origin. |
NavigationInfo Dragengine.Scenery.Navigator.nearestPoint | ( | DVector | point, |
float | radius | ||
) |
Nearest point on nearest navigation space.
point | Point to find nearest point for. |
radius | Maximum radius clamped to 0 or larger to find nearest point in. |
Navigator Dragengine.Scenery.Navigator.new | ( | ) |
Create navigator.
NavigationInfo Dragengine.Scenery.Navigator.pathCollideRay | ( | NavigatorPath | path, |
Collider | collider | ||
) |
Test path for collision using ray test against collider.
NavigationInfo Dragengine.Scenery.Navigator.pathCollideRay | ( | NavigatorPath | path, |
Collider | collider, | ||
DVector | startPosition, | ||
int | nextPoint, | ||
float | maxDistance | ||
) |
Test path for collision using ray test against collider inside range.
path | Path to use. |
collider | Collider to use for testing. |
startPosition | Starting position for testing. |
nextPoint | Index of next point along the path to test. If this is equal to getPathPointCount() the goal position is used. |
maxDistance | Limit testing to maxDistance meters after startPosition along path. |
EOutOfBoundary | nextPoint is less than 0 or larger than getPathPointCount(). |
NavigationInfo Dragengine.Scenery.Navigator.pathCollideShape | ( | NavigatorPath | path, |
Collider | collider, | ||
Collider | agent | ||
) |
Test path for collision using an agent collider moved along the path against a collider.
NavigationInfo Dragengine.Scenery.Navigator.pathCollideShape | ( | NavigatorPath | path, |
Collider | collider, | ||
Collider | agent, | ||
DVector | startPosition, | ||
int | nextPoint, | ||
float | maxDistance | ||
) |
Test path for collision using an agent collider moved along the path against a collider inside range.
path | Path to use. |
collider | Collider to use for testing. |
agent | Collider representing the agent. |
startPosition | Starting position for testing. |
nextPoint | Index of next point along the path to test. If this is equal to getPathPointCount() the goal position is used. |
maxDistance | Limit testing to maxDistance meters after startPosition along path. |
EOutOfBoundary | nextPoint is less than 0 or larger than getPathPointCount(). |
void Dragengine.Scenery.Navigator.removeAllTypes | ( | ) |
Remove all types.
void Dragengine.Scenery.Navigator.removeType | ( | int | type | ) |
Remove type.
void Dragengine.Scenery.Navigator.setBlockingCost | ( | float | cost | ) |
Set maximum cost beyond which a node or path is considered impassable.
void Dragengine.Scenery.Navigator.setDefaultCostPerMeter | ( | float | costPerMeter | ) |
Set cost per meter to use if no matching type is found.
void Dragengine.Scenery.Navigator.setDefaultFixCost | ( | float | cost | ) |
Set fix cost to use if no matching type is found.
void Dragengine.Scenery.Navigator.setLayer | ( | int | layer | ) |
Set layer number.
void Dragengine.Scenery.Navigator.setMaxOutsideDistance | ( | float | maxDistance | ) |
Set maximum distance the start and goal point are allowed to be outside any navigation space.
If the start or goal point is outside the range path update returns an empty path.
void Dragengine.Scenery.Navigator.setSpaceType | ( | NavigationSpaceType | spaceType | ) |
Set space type to navigate.
void Dragengine.Scenery.Navigator.setTypeCostPerMeter | ( | int | type, |
float | costPerMeter | ||
) |
Set cost per meter for type or default cost per meter if not found.
void Dragengine.Scenery.Navigator.setTypeFixCost | ( | int | type, |
float | fixCost | ||
) |
Set fix cost for type or default fix cost if not found.