Penetratio system

Penetration System Overview

The S.A.T. Penetration System is a lightweight, easy-to-extend mechanic for ballistic projectiles that uses Physical Materials to define how well surfaces resist penetration. It works out-of-the-box with no need to manually tag surface types in Project Settings.


πŸ’‘ How It Works (In Short)

  • Ballistic projectiles carry a Penetration integer.

  • On every hit, the projectile checks the Physical Material of the surface.

  • It reads the Penetration Index from a data table (DT_MaterialsIndex).

  • The index value is subtracted from the projectile’s current penetration.

  • If penetration β‰₯ material index β†’ projectile continues

  • If penetration < material index β†’ projectile stops and resets to pool

  • Damage is reduced after each penetration by the Penetration Ratio Variable.


πŸ” Pooling Compatibility

  • When the projectile is stopped by a material it can’t penetrate, it:

    • Triggers impact logic

    • Resets penetration value and damage to original

    • Returns to pool (if pooling is enabled)


πŸ§ͺ Example Setup

Physical Material
Name
Penetration Index

PM_Flesh

Enemy flesh

1

PM_Concrete

Wall surface

3

This means a projectile with penetration value 3:

  • βœ… Can pierce 3 enemies with PM_Flesh

  • ❌ Will stop on the first PM_Concrete surface


πŸ“ Data Table: DT_MaterialsIndex

You can add your own materials by:

  1. Creating a new Physical Material in your project.

  2. Assigning that material to a row in the DT_MaterialsIndex, giving it a penetration index.

  3. Applying the physical material to a mesh's material slot under "Phys Material".


πŸ› οΈ Customization Tips

  • Want armor to block more? Just give it a high index (e.g., 5–10).

  • Want paper-thin surfaces? Set index to 0.

  • Want to simulate light cover? Use fractional damage reduction via the Penetration Ratio.


πŸ’₯ Damage Scaling (Penetration Ratio)

After each penetration, projectile damage is scaled down using a predefined ratio (set on the projectile). For example:

  • Penetration Ratio = 0.75

  • Initial damage = 100

  • After 1st hit = 75

  • After 2nd hit = 56.25

  • And so on...

This prevents infinite multi-kills with a single bullet and creates diminishing returns on deep penetrations.


🎯 Integration Steps Recap

  1. βœ… Create new Physical Materials for the surfaces you want.

  2. βœ… Add each to DT_MaterialsIndex with desired index.

  3. βœ… Assign Physical Materials to your meshes (Static or Skeletal).

  4. βœ… Ensure projectiles hitting those meshes are Ballistic and have Penetration > 0.

  5. βœ… Tweak penetration value and penetration ratio per projectile.


βœ… Best Practices

  • Use pooling only for ballistic projectiles, not explosive.

  • Use clear Physical Material naming (like PM_Wood, PM_Armor, PM_Glass) for organization.

  • Keep indexes intuitive: lower = easier to pass, higher = stronger resistance.

  • Always test with debug lines or prints to confirm material is correctly detected!

Last updated