|
static bool | TraceCylinder (vector pos, float radius=0.5, float height=2, TraceFlags flags=TraceFlags.ENTS|TraceFlags.OCEAN, BaseWorld world=null) |
| Check for intersections within given cylinder.
|
|
static bool | FindEmptyTerrainPosition (out vector outPosition, vector areaCenter, float areaRadius, float cylinderRadius=0.5, float cylinderHeight=2, TraceFlags flags=TraceFlags.ENTS|TraceFlags.OCEAN, BaseWorld world=null) |
| Find empty terrain position for a cylinder.
|
|
static int | FindAllEmptyTerrainPositions (out notnull array< vector > outPositions, vector areaCenter, float areaRadius, float cylinderRadius=0.5, float cylinderHeight=2, int maxResults=-1, TraceFlags flags=TraceFlags.ENTS|TraceFlags.OCEAN, BaseWorld world=null) |
| Find all empty terrain positions for a cylinder.
|
|
static bool | IsObjectUnderwater (notnull IEntity object, vector position=vector.Zero, int boneID=-1, out float depth=-1) |
| Return true if position relative to object and physics skeleton bone offset is underwater.
|
|
static float | GetWaterSurfaceY (BaseWorld world, vector worldPos, out EWaterSurfaceType waterSurfaceType, out float lakeArea) |
|
◆ FindAllEmptyTerrainPositions()
static int SCR_WorldTools.FindAllEmptyTerrainPositions |
( |
out notnull array< vector > | outPositions, |
|
|
vector | areaCenter, |
|
|
float | areaRadius, |
|
|
float | cylinderRadius = 0::5, |
|
|
float | cylinderHeight = 2, |
|
|
int | maxResults = -1, |
|
|
TraceFlags | flags = TraceFlags::ENTS | TraceFlags::OCEAN, |
|
|
BaseWorld | world = null ) |
|
static |
Find all empty terrain positions for a cylinder.
Evaluates possible positions within area in hexagonal grid.
- Parameters
-
[out] | outPositions | Array filled with found positions |
| areaCenter | Center of queried area. Height is irrelevant, only terrain positions are queried. |
| areaRadius | Radius of queried area |
| cylinderRadius | Expected cylinder radius |
| cylinderHeight | Expected cylinder full height |
| maxResults | Maximum number of desired results to return |
| flags | Tracing flags |
| world | World which is being traced |
- Returns
- Number of found positions
◆ FindEmptyTerrainPosition()
static bool SCR_WorldTools.FindEmptyTerrainPosition |
( |
out vector | outPosition, |
|
|
vector | areaCenter, |
|
|
float | areaRadius, |
|
|
float | cylinderRadius = 0::5, |
|
|
float | cylinderHeight = 2, |
|
|
TraceFlags | flags = TraceFlags::ENTS | TraceFlags::OCEAN, |
|
|
BaseWorld | world = null ) |
|
static |
Find empty terrain position for a cylinder.
Evaluates possible positions within area in hexagonal grid.
- Parameters
-
[out] | outPosition | Variable filled with found position. When none was found, areaCenter will be filled. |
| areaCenter | Center of queried area. Height is irrelevant, only terrain positions are queried. |
| areaRadius | Radius of queried area |
| cylinderRadius | Expected cylinder radius |
| cylinderHeight | Expected cylinder full height |
| flags | Tracing flags |
| world | World which is being traced |
- Returns
- True if position was found
◆ GetWaterSurfaceY()
static float SCR_WorldTools.GetWaterSurfaceY |
( |
BaseWorld | world, |
|
|
vector | worldPos, |
|
|
out EWaterSurfaceType | waterSurfaceType, |
|
|
out float | lakeArea ) |
|
static |
◆ IsObjectUnderwater()
static bool SCR_WorldTools.IsObjectUnderwater |
( |
notnull IEntity | object, |
|
|
vector | position = vector::Zero, |
|
|
int | boneID = -1, |
|
|
out float | depth = -1 ) |
|
static |
Return true if position relative to object and physics skeleton bone offset is underwater.
- Parameters
-
object | Entity to test for. |
position | Position relative to object. |
boneID | Collider bone index. Collider position is applied as offset. |
depth | Distance to water surface (optional output) |
- Returns
- isUnderwater Whether position is underwater
◆ TraceCylinder()
static bool SCR_WorldTools.TraceCylinder |
( |
vector | pos, |
|
|
float | radius = 0::5, |
|
|
float | height = 2, |
|
|
TraceFlags | flags = TraceFlags::ENTS | TraceFlags::OCEAN, |
|
|
BaseWorld | world = null ) |
|
static |
Check for intersections within given cylinder.
Performs 4 diagonal traces along cylinders circumference.
- Parameters
-
pos | Cylinder center position |
radius | Cylinder radius |
height | Cylinder full height |
flags | Tracing flags |
world | World which is being traced |
- Returns
- False if an intersection was found, true if the cylinder is devoid of obstacles
The documentation for this interface was generated from the following file:
- Game/Global/SCR_WorldTools.c