drawLaser

From Bohemia Interactive Community
Revision as of 17:04, 3 September 2021 by Lou Montana (talk | contribs) (Some wiki formatting)
Jump to navigation Jump to search
Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.08.

Description

Description:
Draws a laserbeam and a lightpoint at the impact location of the laser.
The command has to be executed each frame - see Arma 3: Mission Event Handlers - Draw3D.
Lasers drawn with this command are subject to the same limitations as weapon attachment lasers as set in the CfgIRLaserSettings config class.
Groups:
InteractionLights

Syntax

Syntax:
drawLaser [sourcePos, direction, color, thickness, dotSize, isIR]
Parameters:
sourcePos: Array format PositionASL - laser origin position
direction: Array format Vector3D - laser's direction vector
color: Array format Color (RGB) - laser beam and impact dot colour. Values can go way above the usual 0..1 range as they also act as emissivity brightness
thickness: Number - laser beam thickness scale; if set to 0, the beam will not render
dotSize: Number - impact dot size; if set to 0 the impact dot will not render
isIR: Boolean - (Optional, default true) whether the laser and impact dot are visible only in Night Vision/Thermal Imaging
Return Value:
Nothing

Examples

Example 1:
addMissionEventHandler ["Draw3D", { drawLaser [ eyePos player vectorAdd [0,0,0.1], getCameraViewDirection player, [1000,0,0], // bright red 20, 5, false ]; }]; // give player a laser eye

Additional Information

See also:
drawIcon3D drawLine3D Arma 3: Mission Event Handlers - Draw3D

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