⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    RicochetProjectileAmmoEffect MonoBehaviour

    Overview

    The RicochetProjectileAmmoEffect module allows projectiles to bounce off surfaces based on the impact angle and the speed the projectile is travelling. If you are using a hitscan shooter, then there is a separate RicochetHitscanAmmoEffect that should be used instead of this.

    This ammo effect is also used alongside another effect to apply damage and visual elements.

    Inspector

    RicochetProjectileAmmoEffect

    Properties

    Name Type Description
    Damage Type DamageType The type of damage the weapon should do with this ammo.
    Initial Hit Effect BaseAmmoEffect The effect of the ammo when it first hits.
    Second Hit Effect BaseAmmoEffect The effect of the ammo after it has penetrated something.
    Layers LayerMask The layers bullets will collide with.
    Normal Vs Deflection Float A blending value based on ricocheting directly along the hit normal (0) vs the reflection of the inbound ray (1).
    Max Scatter Angle Float Randomises the deflected bullet direction within this cone angle.
    Split Count Integer The number of shots to split the ricochet into (1 is no split).
    Projectile Prefab PooledObject The projectile to spawn.
    Speed Mode Dropdown ow the ricochet speed of the projectile is calculated. Multiplier multiplies the contact speed by a set value, FixedSpeed uses a set speed, AngleBasedMultiplier multiplies the contact speed by a value based on the contact angle, AngleBasedSpeed uses a set speed based on the contact angle.
    Speed Multiplier Float A multiplier applied to the bullet speed after ricochet. Only visible when Speed Mode is set to Multiplier.
    Fixed Speed Float The speed of the projectile after ricochet. Only visible when Speed Mode is set to FixedSpeed.
    Straight On Multiplier Float A multiplier applied to the bullet speed after ricochet when the entry velocity was perpendicular to the surface. Only visible when Speed Mode is set to AngleBasedMultiplier.
    Glancing Multiplier Float A multiplier applied to the bullet speed after ricochet if the initial bullet was travelling parallel to the surface. Only visible when Speed Mode is set to AngleBasedMultiplier.
    Straight On Speed Float The speed of the projectile after ricochet when the entry velocity was perpendicular to the surface. Only visible when Speed Mode is set to AngleBasedSpeed.
    Glancing Speed Float The speed of the projectile after ricochet if the initial bullet was travelling parallel to the surface. Only visible when Speed Mode is set to AngleBasedSpeed.
    Gravity Float The gravity for the projectile.

    See Also

    Modular Firearms

    Surfaces

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