⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    ThrownWeapon MonoBehaviour

    Overview

    The ThrownWeapon behavior is used for weapons such as hand grenades.

    Inspector

    ThrownWeapon

    Properties

    Name Type Description
    Animator Location Dropdown What animators should be exposed to the weapon components. Options are None, AttachedOnly, AttachedAndCharacter, MultipleAttached, MultipleAttachedAndCharacter and CharacterOnly.
    Animator Animator The animator component of the weapon.
    Pose Transform Transform The transform that should be offset for weapon poses.
    Projectile Spawn Point Weak Transform A proxy transform for setting the position and rotation of the spawned projectile (weak throw).
    Projectile Spawn Point Strong Transform A proxy transform for setting the position and rotation of the spawned projectile (strong throw).
    Spawned Projectile PooledObject The prefab to throw.
    Held Object GameObject The weapon game object. This is deactivated and swapped with the pooled object during the throw animation.
    Inherit Velocity Float How much of the character velocity does the thrown weapon inherit (think Counter Strike).
    Spawn Time Weak Float The point in the animation (seconds) to swap the animated weapon with the pooled physics weapon (weak throw).
    Spawn Time Strong Float The point in the animation (seconds) to swap the animated weapon with the pooled physics weapon (strong throw).
    Throw Speed Weak Float The throw speed of the projectile (weak throw).
    Throw Speed Strong Float The throw speed of the projectile (strong throw).
    Throw Duration Weak Float The full duration of the weak throw animation.
    Throw Duration Strong Float The full duration of the strong throw animation.
    Draw Duration Float The time it takes to raise the weapon.
    Crosshair FpsCrosshair The crosshair to show when the weapon is drawn.
    Audio Rotator AudioRotator An audio rotator for weapon noises.
    Audio Select AudioClip The audio clip when raising the weapon.
    Audio Throw Light AudioClip The audio clip for a weak throw.
    Audio Throw Heavy AudioClip The audio clip for a strong throw.
    Animator Animator The animator component of the weapon.
    Anim Key Draw String The key for the AnimatorController trigger property that triggers the draw animation.
    Anim Key Light Throw String The key for the AnimatorController trigger property that triggers the light throw animation.
    Anim Key Heavy Throw String The key for the AnimatorController trigger property that triggers the heavy throw animation.
    Anim Key Lower String The AnimatorController trigger key for the weapon lower animation (blank = no animation).
    Lower Duration Float The time taken to lower the item on deselection.

    Origin Point

    The NeoFPS weapons assume that the camera is placed at the origin. For many assets or 3rd party weapons, the origin is at the character feet or hips and the camera is a child object of the weapon's hierarchy. To align the object to correctly work with NeoFPS you can drag the camera object of the weapon into the Match Transform field under the Origin Point heading. This will move everything below the spring object to match up.


    See Also

    Thrown Weapons

    PooledObject

    Unity Animator

    Unity AnimatorController

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