Page 1 of 1

Function - Line Of Sight

PostPosted: Sat Mar 05, 2005 7:11 am
by jazz_e_bob
int lineOfSight ( char *actor1, char *actor2, double viewAngle, double fieldOfView, double viewRange )

Actor1/Actor2
Any Actors in game.

viewAngle
The direction Actor1 is facing.

fieldOfView
How "wide" the range of vision is. 90 degrees would be a typical value.

viewRange
How far the actor can see.

Returns
1 if clear line of sight between actor1 and actor2. 0 otherwise.

Note
Will ignore actors with actor variable "isSeeThrough" set to 1;

I have spent many days trying to make this with actors and timers but the code has become bloated and unmanageable. I feel that this would be an excellent addition to GE's function library. Please consider! :)