Geometry Survival
Mission Brief
Build a responsive 3D top-down shooter arena capable of handling continuous projectile fire and enemy waves without frame-time spikes or broken GPU draw-call batching.
Key Systems Engineered
Ground-Plane Raycast Mouse Aiming Decoupled from Movement (PlayerController.cs)
Separates unit-clamped WASD Rigidbody velocity from cursor aiming by casting a Physics.Raycast from the camera through the mouse screen position against a dedicated groundLayer to compute exact world-space look rotation.
Dual Independent Object Pools (ObjectPool & EnemySpawner)
Implements pre-warmed, self-expanding object pools twice independently — once for high-frequency player bullets and once for enemy wave spawning and recycling.
GPU-Batching-Safe Dissolve Shader Animation (EnemyHealth.cs)
Animates _DissolveStrength during enemy spawn-in and death using a MaterialPropertyBlock rather than material.SetFloat, preventing per-enemy material duplication and preserving GPU draw-call batching while disabling colliders mid-dissolve to prevent double-hit bugs.
Implementation Details
Architecture & Deep Dive
Geometry Survival separates movement from aiming by raycasting against a dedicated ground plane layer, computing world-space aim direction independently of WASD velocity input.
The dissolve shader effect uses MaterialPropertyBlock instead of direct material property modification, preventing Unity from creating per-instance material copies that would break GPU draw-call batching. Colliders are disabled during the dissolve animation to prevent double-hit bugs.