PenetratingProjectileAmmoEffect MonoBehaviour
Overview
The PenetratingProjectileAmmoEffect module allows projectiles to penetrate through surfaces based on the impact angle and the speed the projectile is travelling. A new projectile will be spawned on the other side of the surface, with its speed and direction altered based on the impact.
If you are using a hitscan shooter, then there is a separate PenetratingHitscanAmmoEffect that should be used instead of this.
This ammo effect is also used alongside another effect to apply damage and visual elements.
Inspector

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. |
| Max Penetration | Float | The maximum thickness of object the bullet can penetrate. |
| Penetration Speed | Float | The speed at which max penetration will be reached. The speed will also be clamped to this so that (for example) hitscan weapons don't have infinite speed. |
| Layers | LayerMask | The layers bullets will collide with. |
| Max Scatter Angle | Float | Randomises the deflected bullet direction within this cone angle. |
| 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. |
| Projectile Prefab | PooledObject | The projectile to spawn. |
| Gravity | Float | The gravity for the projectile. |