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



Introduced in

Version:2.12

Description

Description:
Returns a weapon bounding box.

Note: When using this command, keep in mind the unique orientation of weapons (as described in getMuzzlePos), when interpreting the returned values.

In versions prior to V3.4, the bounding box contains all defined points in the model (including muzzleflash definitions). This makes the returned box significantly larger than the weapon object itself:


(muzzleflash memory points in a pistol model - included prior to V3.4)

Syntax

Syntax:object getWeaponBBox weaponType
Parameters:
  • object: Object - Unit equipped with weapon
  • weaponType: String - Unit's weapon type to examine. Can be:
"PRIMARY", "SECONDARY", "HANDGUN" or "BINOCULAR".
Return Value:Array - Contains two Position3D, to indicate the lower left and upper right corner of the bounding box. If the specified weapon type does bit exist, then Variables - Null is returned.

Examples

Examples:
_bbox = player getWeaponBBox "HANDGUN";
// might return: [[-0.11,-0.03,-0.11],[0.12,0,0.04]]

Additional Information

See also: boundingBox
Multiplayer: 
Problems: 

Notes