RSBDOCS
API reference

BallisticSurface

Public penetration and ricochet settings.

Source: src/Ballistics/BallisticSurface.cs. All fields below are read/write.

FieldTypeMeaning
m_penetrationEnabledboolEnable penetration.
m_penetrationEnergyConsumptionPercentfloatEnergy loss fraction, 0–1, repeated over thickness steps.
m_minEnergyToPenetrateInMetricsfloatPenetration entry threshold in joules.
m_penetrationDeflectionAnglesVector2Minimum/maximum randomized exit-deflection settings.
m_ricochetEnabledboolEnable ricochet.
m_ricochetEnergyConsumptionPercentfloatEnergy loss fraction, 0–1, applied once at impact.
m_minEnergyToRicochetInMetricsfloatRicochet threshold in joules.
m_ricochetDeflectionAnglesVector2Minimum/maximum randomized reflection-deflection settings.

The field names use Energy, not the misspelling Enegry in the old API table. The threshold names end in InMetrics (plural). Both thresholds use a strict greater-than comparison.

SurfacePreset values are Custom, Wood, HardWood, Metal, Steel, LightSteel, Plastic and Cloth. Presets and measurement display are configured in the custom Inspector. Runtime fields remain metric even if the Inspector displays imperial units.

The system checks penetration before ricochet. It finds the component on hit.transform using GetComponent; it does not search parents.