BIS fnc inAngleSector: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\|= * " to " ")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| arma3 |Game name=
| arma3


|1.00|Game version=
|1.00


|gr1 = Geometry |GROUP1=
|gr1 = Geometry


|Checks if a position lies within an angle sector.<br>
|Checks if a position lies within an angle sector.<br>
[[Image: BIS fnc inAngleSector.jpg|700px]]
[[Image: BIS fnc inAngleSector.jpg|700px]]
|DESCRIPTION=


| [center, centerAngle, sectorWidth, position] call '''BIS_fnc_inAngleSector''' |SYNTAX=
|p1= center : [[Array]] - Center position  |PARAMETER1=
|p2= centerAngle : [[Number]] - Defines the center angle of the sector  |PARAMETER2=
|p3= sectorWidth: [[Number]] - Defines the width of the sector in degrees  |PARAMETER3=
|p4= position: [[Array]] - The position which should be checked  |PARAMETER4=


| [[Boolean]]: Returns [[true]] if the position lies within sector|RETURNVALUE=
| [center, centerAngle, sectorWidth, position] call '''BIS_fnc_inAngleSector'''
|p1= center : [[Array]] - Center position
|p2= centerAngle : [[Number]] - Defines the center angle of the sector
|p3= sectorWidth: [[Number]] - Defines the width of the sector in degrees
|p4= position: [[Array]] - The position which should be checked
 
| [[Boolean]]: Returns [[true]] if the position lies within sector
|x1=<code>[ [[position]] [[player]], [[getDir]] [[player]], 30, [[position]] enemy_tank ] [[call]] [[BIS_fnc_inAngleSector]];</code>
|x1=<code>[ [[position]] [[player]], [[getDir]] [[player]], 30, [[position]] enemy_tank ] [[call]] [[BIS_fnc_inAngleSector]];</code>


| [[BIS_fnc_isInFrontOf]] |SEEALSO=
| [[BIS_fnc_isInFrontOf]]


}}
}}

Revision as of 00:12, 18 January 2021

Hover & click on the images for description

Description

Description:
Checks if a position lies within an angle sector.
BIS fnc inAngleSector.jpg
Execution:
call
Groups:
Geometry

Syntax

Syntax:
[center, centerAngle, sectorWidth, position] call BIS_fnc_inAngleSector
Parameters:
center : Array - Center position
centerAngle : Number - Defines the center angle of the sector
sectorWidth: Number - Defines the width of the sector in degrees
position: Array - The position which should be checked
Return Value:
Boolean: Returns true if the position lies within sector

Examples

Example 1:
[ position player, getDir player, 30, position enemy_tank ] call BIS_fnc_inAngleSector;

Additional Information

See also:
BIS_fnc_isInFrontOf

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note