Page tree
Skip to end of metadata
Go to start of metadata




Introduced in

Version:1.22

Description

Description:Determines the visibility of an object from a specified position, and returns the ratio of visible boundingBox corners (if none are visible, 0 is returned, if all eight are visible, 1 is returned).

Syntax

Syntax:[array, vehicle, except] call fn_vbs_getVisibility
Parameters:
  • array: Array - Position in the PositionAGL format.
  • vehicle: Object - The vehicle
  • except: Array - Array with objects which are not taken into account as view blockers (optional).
Return Value:Number - Visibility ratio.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Functions A-Z.

Examples

Examples:
_isVisible = [position player, target, [player]] call fn_vbs_getVisibility

Additional Information

See also: fn vbs isVisible,getVisibility, collisionDetection
Multiplayer: 
Problems: 

Notes