Difference between revisions of "OBSE Wish List"
m
→Other Functions
imported>Thalassicus |
imported>Thalassicus |
||
Line 138: | Line 138: | ||
==Other Functions== | ==Other Functions== | ||
Functions which don't fit into other categories: | Functions which don't fit into other categories: | ||
*'''GetCollisionTrace''' - Generalized version of [[GetLOS]] to return where collision occurs, rather than a boolean expression of success or failure. Traces a line from a start point to a destination and returns an array of 3 elements corresponding to the | *'''GetCollisionTrace''' - Generalized version of [[GetLOS]] to return where collision occurs, rather than a boolean expression of success or failure. Traces a line from a start point to a destination and returns an array of 3 elements corresponding to the XYZ coordinates one iteration-step before collision with a surface occurs. If collision is never detected, returns the destination point. Actors are ignored for the collision check if optional parameter ignoreActors is true, defaults to false. If necessary for efficiency, implementation can include a distance between collision checks specified by optional parameter distanceSkip, defaulting to 16 (or some other efficient value). | ||
(If the game engine has the power to do so, an even better return value would be a two-dimensional array, each row containing a 3-column XYZ sub-array, for each point where collision with a new surface is detected from the start to destination.) Usage: | |||
:array<float> startRef:reference.'''GetCollisionTrace''' destRef:reference, ''ignoreActors:bool, distanceSkip:float'' | :array<float> startRef:reference.'''GetCollisionTrace''' destRef:reference, ''ignoreActors:bool, distanceSkip:float'' | ||
:array<float> '''GetCollisionTrace''' startX:float, startY:float, startZ:float, destX:float, destY:float, destZ:float, ''ignoreActors:bool, distanceSkip:float'' | :array<float> '''GetCollisionTrace''' startX:float, startY:float, startZ:float, destX:float, destY:float, destZ:float, ''ignoreActors:bool, distanceSkip:float'' | ||
*'''GetCollisionTraceSpherical''' - Same as GetCollisionTrace, but uses [http://en.wikipedia.org/wiki/Spherical_coordinate_system spherical coordinates] to calculate the destination point. Usage: | *'''GetCollisionTraceSpherical''' - Same as GetCollisionTrace, but uses [http://en.wikipedia.org/wiki/Spherical_coordinate_system spherical coordinates] to calculate the destination point. Usage: | ||
:array<float> startRef:reference.'''GetCollisionTraceSpherical''' distance:float, elevation:float, heading:float, ''ignoreActors:bool, distanceSkip:float'' | :array<float> startRef:reference.'''GetCollisionTraceSpherical''' distance:float, elevation:float, heading:float, ''ignoreActors:bool, distanceSkip:float'' |