This component should be attached to a muzzle transform object representing the origin of the laser from the gun. Toggling this object on or off will enable/disable the laser beam. The laser does damage every update while active. It extends from the muzzle transform to ’Beam Range’ in front of the weapon. It does not spawn a separate projectile object, thus saving memory and CPU over a very fast ’Bullet’ and also giving an effect that moves with the weapon, whereas a ’Bullet’ will maintain it’s original trajectory after leaving the weapon. Since the object is never destroyed, pooling is not necessary on mobile.
LayerMask
hitRayMaskA Layer Mask indicating which objects this beam can hit. It will pass through anything not tagged with this mask, and deal damage to anything it hits that has a ’Health’ component, or any other component that can receive the ’ModifyHealth’ message
Turns on the beam
Turns off the beam
LayerMask
hitRayMaskA Layer Mask indicating which objects this beam can hit. It will pass through anything not tagged with this mask, and deal damage to anything it hits that has a ’Health’ component, or any other component that can receive the ’ModifyHealth’ message
Turns on the beam
Turns off the beam