j.foucher 58df608550 Fix penetration/ricochet bugs: division by zero, edge cases, incidence angle
P0 - Division by zero fixes:
- Clamp PhysMaterial->Density to min 0.001 before division
- Clamp MuzzleVelocity averages to min 1.0 in all divisions
- Clamp PhysMaterial->Restitution to [0, 1]

P1 - Edge case guards:
- Stop bullet immediately when velocity is near-zero (prevents NaN)
- Handle near-zero cross product at very shallow grazing angles
- Handle zero-length bounceAngle in ricochet calculation

P2 - Improvements:
- Fix typo: BlockTIme -> BlockTime
- Add incidence angle factor to penetration depth: grazing shots
  penetrate less (5% at ~5deg) while head-on shots get full depth

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 19:29:45 +01:00
2026-03-18 19:08:24 +01:00
2026-03-18 19:08:24 +01:00
2026-03-14 10:54:12 +01:00
Description
No description provided
447 MiB
Languages
C++ 61%
HTML 20.8%
Python 16.3%
C# 1%
Batchfile 0.9%