⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    SurfaceBulletPhysicsAmmoEffect MonoBehaviour

    Overview

    The SurfaceBulletPhysicsAmmoEffect module allows bullets to ricochet and penetrate objects based on the surface. This ammo effect is used alongside another effect to apply damage and visual elements. Since both ricochets and penetrations reduce the speed of the resulting projectile, this effect works well when paired with the AdvancedBulletAmmoEffect which allows damage to fall-off with speed.

    The penetration and ricochet settings for each surface are specified using a SurfaceBulletPhysicsInfo scriptable object.

    This module only works with projectile based shooters.

    Inspector

    SurfaceBulletPhysicsAmmoEffect

    Properties

    Name Type Description
    Damage Type DamageType The type of damage the weapon should do with this ammo (does nothing for this effect).
    Hit Effect BaseAmmoEffect The effect of the ammo when it hits something.
    Surface Physics SurfaceBulletPhysicsInfo The per-surface bullet physics info
    Layers [LayerMask][unity-layers] 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 Ricochet Scatter Float Randomises the deflected bullet direction within this cone angle, dependent on surface settings.
    Max Penetration Deflect Float Randomises the penetrating bullet direction within this cone angle, dependent on surface settings.
    Exit Effect Size Float Uses the surface system to show a bullet hit effect on exit. Set this to zero if you don't want it to happen.
    Recursive Boolean Should the bullet keep ricocheting / penetrating after the first time until it has slowed or travelled far enough.
    Projectile Prefab PooledObject The projectile to spawn.
    Gravity Float The gravity for the projectile.

    See Also

    Modular Firearms

    Surfaces

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