drawLaser

From Bohemia Interactive Community
Revision as of 17:27, 3 September 2021 by Dedmen (talk | contribs) (Created page with "{{RV|type=command |game1= arma3 |branch= dev |version1= 2.08 |eff= local |descr= Draws a laserbeam and a lightpoint at the impact location of the laser. <br> Command has...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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.
Command has to be executed each frame. Use addMissionEventHandler "Draw3D" which is executed each frame.
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: PositionASL - World position of the Laser Source
direction: Array - Direction vector along which the Laser will shine
color: Array - RGB color of the laserbeam and impact dot
color: Scalar - Thickness of the laser beam. If set to 0 the beam will not render.
dotSize: Scalar - Size of the impact dot. If set to 0 the impact dot will not render.
isIR (Optional, default: true): Scalar - Whether the Laser and impact dot are only visible in Nightvision/Thermal Imaging
Return Value:
Nothing

Examples

Example 1:
onEachFrame {drawLaser [[[eyePos]] player vectorAdd [0,0,0.1], getCameraViewDirection player, [1000,0,0], 20, 5, false]}; // Gives player a laser eye

Additional Information

See also:
drawIcon3D drawLine3D

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