SlashCo Wiki

SlashCo.RadialTester

 number SlashCo.RadialTester( Entity ent, number dist, Entity secondary )

Description

Tests directions around an entity to find an unobstructed angle
If an unobstructed direction is found, its angle is returned immediately
If all tested directions are blocked, the angle with the greatest traced distance is returned

Arguments

1Entity ent

The entity from which the traces are performed.

2number dist

The distance to trace in each direction.

3Entity secondary

An additional entity to ignore when performing the traces.

Returns

1number angle

The angle of the selected direction.