CheckLineOfSightVector

From Dragon Age Toolset Wiki
Jump to: navigation, search

Determines if there is a line of sight between two positions.

int CheckLineOfSightVector(
vector vSource,
vector vTarget
);
Parameters:
vSource
The first position vector
vTarget
The second position vector
Returns:

Returns TRUE if there is a clear line of sight between the two positions. Returns FALSE if there is not.

Source:

script.ldf

Description

Returns TRUE if there is a line of sight between the position contained in vector vSource and the position contained in vector vTarget, otherwise returns FALSE. If the line is occluded by geometry then the function will return FALSE. Both vectors are assumed to refer to positions in the area the object running this function is currently in, therefore this function must be run on an object which is in the area in which you wish to test the line of sight.

Remarks

This function must be run on a valid object in the area, ie: a creature, placeable... etc. It should be noted that the function is somewhat expensive and should not be called in an inner loop of your script.


See also

CheckLineOfSightObject