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




Introduced in

Version:1.22

Description

Description:Finds out if a vehicle or position is visible from the given position. It checks the visibility of the center and the eight boundingBox corners, and can take exceptions into account. For positions, the rate argument is obsolete, as those are either visible or not.

Syntax

Syntax:[array, check, rate, except] call fn_vbs_isVisible
Parameters:
  • array: Array (PositionAGL format)
  • check: Object or Array (PositionAGL format)
  • rate: Number (optional) - Value between 0 and 1, the higher the value, the more boundingBox edges have to be visible for this function to return true. The standard rate is 0.1.
  • except: Array (optional) - Array with objects which are not taken into account as view blockers.
Return Value:Boolean

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,.2, [player]] call fn_vbs_isVisible

Additional Information

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

Notes