
SYS.BLOG
Destruction Physics in Unity 5
Testing mesh destruction physics in Unity 5 using the Exploder plugin for a turret-based sci-fi shooter, with a playable WebGL demo.
Testing destruction physics in Unity 5 for a turret-based sci-fi shooter. The demo cycles through three weapon types against an assortment of targets (spheres, cubes, and watermelons) set against a space-themed environment.
Three weapons are demonstrated in the video:
- Seeker: semi-automatic explosive projectiles that fragment targets on impact
- Pulse Laser: a continuous blue energy beam that precisely slices through objects
- Vulcan: rapid-fire machine gun that shreds debris at high volume
Mesh destruction is handled by the Exploder plugin. The turret model is from Sci-Fi Effects. Projectiles reposition the Exploder object to the impact point, destroying everything within a small radius.
Next steps: implementing proper enemies and a spawning system, plus a UI.
Want to try it? Play it in your browser here.
FREQUENTLY ASKED QUESTIONS
Why is Unity physics not deterministic?
Unity's physics engine produces slightly different results across machines due to floating-point precision and timing differences. On the same machine, 2D physics using Box2D can be deterministic, but cross-platform determinism requires custom fixed-point implementations.
Is Unity physics suitable for real-time destruction effects?
Yes, Unity can handle real-time destruction through mesh fragmentation and rigid body simulation. Performance depends on fragment count and physics solver iterations, so optimizations like pooling pre-fractured pieces are often necessary.
What is the Unity physics engine based on?
Unity 3D physics uses NVIDIA PhysX while 2D physics uses Box2D. Both are well-established engines, though neither guarantees cross-platform determinism out of the box.


