AEROSIM-TS-33
Generate Rapier terrain collision from normalized heights
The physics runtime generates the terrain collider from the same normalized height data used by the renderer.
- Verified flow state
- Done
- Owner
- AeroSim Architecture and Delivery
- Feature
- AEROSIM-FT-47
- Component
- Web Application — Rapier terrain collider
- Repository
- corp-v1-aerosim/corp-v1-aerosim
Delivery scope
Convert the same NormalizedHeightData samples into a fixed Rapier heightfield collider, apply the grid cell scale and origin transform once, expose collisionHeightAt(x,z), and remove the collider when data changes or the world resets. Primary files: applications/web/src/flight/terrain/TerrainCollider.tsx, applications/web/src/flight/terrain/build-heightfield-collider.ts, applications/web/tests/terrain/terrain-collider.test.tsx.
Implementation contract
Implementation artifacts
- applications/web/src/flight/terrain/TerrainCollider.tsx
- applications/web/src/flight/terrain/build-heightfield-collider.ts
- applications/web/tests/terrain/terrain-collider.test.tsx
Inputs
- NormalizedHeightData instance also passed to TerrainMesh
- Rapier World and terrain collision group configuration
Outputs
- Fixed Rapier heightfield ColliderHandle covering the normalized grid
- collisionHeightAt result produced by the active collider coordinate transform
Failure boundaries
- Reject a detached Rapier world, invalid scale transform, or heightfield dimension mismatch before collider creation.
- Remove the old collider and references before installing replacement data; stale handles cannot answer elevation queries.
Excluded scope
- Mesh colliders from arbitrary glTF assets, deformable terrain, vehicles, and terrain streaming are not supported.
Verification steps
- pnpm --filter @aerosim/web test -- terrain/terrain-collider.test.tsx
- Create ridge-5x5, drop a probe body over peak and slope points, assert contact, replace data, and verify the old collider handle is invalid.
Traceability
Dependencies
- AEROSIM-TS-32Canonical ID: TASK-0032
UI/UX applicability
non_visual
This Task owns technical or behavioral acceptance and does not claim direct visual conformance to the approved UI/UX package.
Acceptance evidence
Verified delivery: application PR #66 reviewed head c0cdcb260e944ee170e6dffa0bbd8a5152b01753, exact-head required validation task 2134 succeeded, merged as 7de1a447a7aa95c20ec69a66c9713e8e4474b895; current integrated application head 7de1a447a7aa95c20ec69a66c9713e8e4474b895 passed required validation task 2142, publish task 2140, and validate task 2141. Release completion verified on product 1.0.0.0 at GitOps revision 5d3712d89dfbf7dacd993348e55f497d126c7bf9 with Argo Synced/Healthy, exact image digests, authenticated API/database access, and three-world configured-flight acceptance.
Current evidence boundary
No current implementation, acceptance, release, or deployment evidence is claimed for this planned Task. Any prior implementation may be used only as prototype and discovery evidence.