{"name":"drawLaser","title":"drawLaser","type":"command","url":"https://community.bistudio.com/wiki/drawLaser","revid":377735,"updated":"2026-01-03T00:22:18Z","groups":["Interaction","Lights"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"effect":"local"},"description":"Draws a laserbeam and a lightpoint at the impact location of the laser.\nThis command has to be executed every frame - see Arma 3: Mission Event Handlers - Draw3D.\nLasers drawn with this command are subject to the same limitations as weapon attachment lasers. These limitations are defined in the `CfgIRLaserSettings` config class.","syntaxes":[{"syntax":"drawLaser [position, direction, beamColor, dotColor, dotSize, beamThickness, beamMaxLength, isIR]","params":[{"name":"position","type":"PositionASL","description":"the laser's origin position","type_expr":"PositionASL"},{"name":"direction","type":"Array of Vector3D","description":"the laser's direction vector","type_expr":"Array<Vector3D>"},{"name":"beamColor","type":"Color (RGB)","description":"laser beam color. The values can go way above the usual 0..1 range as they also act as emissivity brightness","type_expr":"Color"},{"name":"dotColor","type":"Color (RGB) or Empty Array","description":"impact dot color. Set to `[]` to use the same value as *beamColor*.","type_expr":"Color | Array"},{"name":"dotSize","type":"Number","description":"impact dot size; if set to 0 the impact dot will not render","type_expr":"Number"},{"name":"beamThickness","type":"Number","description":"laser beam's thickness scale; if set to 0, the beam will not render","type_expr":"Number"},{"name":"beamMaxLength","type":"Number","optional":true,"default":"-1","description":"laser beam's maximum length. `-1` means maximum length (defined in `CfgIRLaserSettings`), `0` means no length at all and the command is ignored","type_expr":"Number","text":"beamMaxLength: Number - (Optional, default -1) laser beam's maximum length. `-1` means maximum length (defined in `CfgIRLaserSettings`), `0` means no length at all and the command is ignored"},{"name":"isIR","type":"Boolean","optional":true,"default":"true","description":"whether the laser and impact dot are only visible with Night Vision / Thermal Imaging","type_expr":"Boolean","text":"isIR: Boolean - (Optional, default true) whether the laser and impact dot are only visible with Night Vision / Thermal Imaging"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[position, direction, beamColor, dotColor, dotSize, beamThickness, beamMaxLength, isIR]"}}],"examples":[{"text":"Give the player a laser eye:\n\n```sqf\naddMissionEventHandler [\"Draw3D\", {\n    drawLaser [\n        eyePos player vectorAdd [0, 0, 0.1],\n        getCameraViewDirection player,\n        [1000, 0, 0], // Bright red\n        [],\n        5,\n        20,\n        -1,\n        false\n    ];\n}];\n```","code":["addMissionEventHandler [\"Draw3D\", {\n\tdrawLaser [\n\t\teyePos player vectorAdd [0, 0, 0.1],\n\t\tgetCameraViewDirection player,\n\t\t[1000, 0, 0], // Bright red\n\t\t[],\n\t\t5,\n\t\t20,\n\t\t-1,\n\t\tfalse\n\t];\n}];"]}],"see_also":["drawIcon3D","drawLine3D"]}