drawLaser: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - "<tt>([a-zA-Z0-9\. _"']+)<\/tt>" to "{{hl|$1}}") |
||
Line 11: | Line 11: | ||
|descr= Draws a laserbeam and a lightpoint at the impact location of the laser.<br> | |descr= Draws a laserbeam and a lightpoint at the impact location of the laser.<br> | ||
This command has to be executed every frame - see {{HashLink|Arma 3: Mission Event Handlers#Draw3D}}.<br> | This command has to be executed every frame - see {{HashLink|Arma 3: Mission Event Handlers#Draw3D}}.<br> | ||
Lasers drawn with this command are subject to the same limitations as weapon attachment lasers. These limitations are defined in the | Lasers drawn with this command are subject to the same limitations as weapon attachment lasers. These limitations are defined in the {{hl|CfgIRLaserSettings}} config class. | ||
|gr1= Interaction | |gr1= Interaction | ||
Line 31: | Line 31: | ||
|p6= beamThickness: [[Number]] - laser beam's thickness scale; if set to 0, the beam will not render | |p6= beamThickness: [[Number]] - laser beam's thickness scale; if set to 0, the beam will not render | ||
|p7= beamMaxLength: [[Number]] - (Optional, default: -1) laser beam's maximum length. <tt>-1</tt> means maximum length (defined in | |p7= beamMaxLength: [[Number]] - (Optional, default: -1) laser beam's maximum length. <tt>-1</tt> means maximum length (defined in {{hl|CfgIRLaserSettings}}), {{hl|0}} means no length at all and the command is ignored | ||
|p8= isIR: [[Boolean]] - (Optional, default: [[true]]) whether the laser and impact dot are only visible with Night Vision / Thermal Imaging | |p8= isIR: [[Boolean]] - (Optional, default: [[true]]) whether the laser and impact dot are only visible with Night Vision / Thermal Imaging |
Revision as of 23:44, 15 November 2021
Description
- Description:
- Draws a laserbeam and a lightpoint at the impact location of the laser.
This command has to be executed every frame - see Arma 3: Mission Event Handlers - Draw3D.
Lasers drawn with this command are subject to the same limitations as weapon attachment lasers. These limitations are defined in the CfgIRLaserSettings config class. - Groups:
- InteractionLights
Syntax
- Syntax:
- drawLaser [position, direction, beamColor, dotColor, dotSize, beamThickness, beamMaxLength, isIR]
- Parameters:
- position: PositionASL - the laser's origin position
- direction: Array of Vector3D - the laser's direction vector
- beamColor: Array of Color (RGB) - laser beam color. The values can go way above the usual 0..1 range as they also act as emissivity brightness
- dotColor: Array of Color (RGB) - impact dot color. Set to
[]
to use the same value as beamColor. - dotSize: Number - impact dot size; if set to 0 the impact dot will not render
- beamThickness: Number - laser beam's thickness scale; if set to 0, the beam will not render
- 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
- isIR: Boolean - (Optional, default: true) whether the laser and impact dot are only visible with Night Vision / Thermal Imaging
- Return Value:
- Nothing
Examples
- Example 1:
- Give the player a laser eye:
addMissionEventHandler ["Draw3D", { drawLaser [ eyePos player vectorAdd [0, 0, 0.1], getCameraViewDirection player, [1000, 0, 0], // Bright red [], 5, 20, -1, false ]; }];
Additional Information
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