Workshop.codes
Create

Is In Line of Sight Last updated November 26, 2024

Description

Whether two positions have line of sight with each other.

Snippet

Is In Line of Sight(Vector(0, 0, 0), Vector(0, 0, 0), Barriers DO NOT BLOCK LOS);

Properties

Returns: Boolean
Parameters: Start Pos, End Pos, Barriers

Start Pos
Type: Position | Player, Default: Vector
The start position for the line-of-sight check. If a player is provided, a position 2 meters above the player's feet is used.

End Pos
Type: Position | Player, Default: Vector
The end position for the line-of-sight check. If a player is provided, a position 2 meters above the player's feet is used.

Barriers
Type: BarrierLos, Default: Barriers DO NOT BLOCK LOS
Defines how barriers affect line of sight. When considering whether a barrier belongs to an enemy, the allegiance of the player provided to start pos (if any) is used.

Workshop.codes