⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    WieldableLaserPointer MonoBehaviour

    Overview

    The WieldableLaserPointer behaviour is used to add a toggleable laser pointer to firearms with configurable colour and intensity.

    Inspector

    WieldableLaserPointer

    Properties

    The WieldableLaserPointer properties are split into a number of sections:

    Name Type Description
    Laser Colour Color The colour of the laser.
    Start On Boolean Should the laser be on from start.

    Beam

    Name Type Description
    Laser Source Transform The transform the laser will be projected from (forwards).
    Max Laser Distance Float The furthest distance the laser pointer will be visible.
    Beam Falloff Float The alpha falloff of the beam over its length.

    Flare

    Name Type Description
    Flare Size Float The size of the laser hit point flare.
    Flare Offset Float The distance the flare should be pushed forward towards the camera from the point of impact (prevents intersection with walls).
    Flare Material Material The material to use for the laser impact flare. NeoFPS includes a shader for laser flares with variable intensity and colour.

    Events

    Name Type Description
    On Toggle On UnityEvent An event fired when the laser is switched on.
    On Toggle Off UnityEvent An event fired when the laser is switched off.

    See Also

    Modular Firearms

    Attachments

    Back to top Copyright © 2019 Yondernauts Game Studios Ltd
    Generated with DocFX