Difference between revisions of "CheckLineOfSightVector"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (1 revision: Importing auto-generated function articles)
(looks okay, removing tag)
 
Line 1: Line 1:
{{Generated}}
 
 
{{dafunction
 
{{dafunction
 
|name=CheckLineOfSightVector
 
|name=CheckLineOfSightVector
Line 17: Line 16:
 
== Description ==
 
== Description ==
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
Returns TRUE if there is a line of sight between the position contained in vector vSource and the position contained
+
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.
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 ==
 
== Remarks ==
 
<!-- This section contains additional comments, observations and known issues. -->
 
<!-- This section contains additional comments, observations and known issues. -->
This function must be run on a valid object in the area, ie: a creature, placeable... etc.
+
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.
It should be noted that the function is somewhat expensive and should not be called in an inner loop of your script.
+
  
 
<!-- == Examples == -->
 
<!-- == Examples == -->

Latest revision as of 17:32, 1 March 2010

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