BIS fnc inAngleSector: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Some wiki formatting)
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|Game version=
|gr1= Geometry


|gr1 = Geometry |GROUP1=
|descr= [[File:BIS_fnc_inAngleSector.jpg|500px|right]]
Checks if a position lies within an angle sector.


|Checks if a position lies within an angle sector.<br>
|s1= [center, centerAngle, sectorWidth, position] call [[BIS_fnc_inAngleSector]]
[[Image: BIS fnc inAngleSector.jpg|700px]]
|DESCRIPTION=


| [center, centerAngle, sectorWidth, position] call '''BIS_fnc_inAngleSector''' |SYNTAX=
|p1= center : [[Array]] - center position
|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=
|p2= centerAngle : [[Number]] - defines the center angle of the sector
|x1=<code>[ [[position]] [[player]], [[getDir]] [[player]], 30, [[position]] enemy_tank ] [[call]] [[BIS_fnc_inAngleSector]];</code> |=


| [[BIS_fnc_isInFrontOf]] |SEEALSO=
|p3= sectorWidth: [[Number]] - defines the width of the sector in degrees


|p4= position: [[Array]] - the position which should be checked
|r1= [[Boolean]] - [[true]] if the position lies within the defined sector
|x1= <sqf>[getPosWorld player, getDir player, 30, getPosWorld enemy_tank] call BIS_fnc_inAngleSector;</sqf>
|seealso= [[BIS_fnc_isInFrontOf]]
}}
}}

Latest revision as of 18:06, 18 January 2023

Hover & click on the images for description

Description

Description:
BIS fnc inAngleSector.jpg
Checks if a position lies within an angle sector.
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 - true if the position lies within the defined sector

Examples

Example 1:
[getPosWorld player, getDir player, 30, getPosWorld 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