Offset Geometric Contact — Interactive Physics Demonstration
Real-time interactive visualization of ACM TOG 2025 contact simulation research with 6 physically challenging scenarios.
A playable Unity demo showcasing Offset Geometric Contact (OGC)—a breakthrough physics algorithm from ACM TOG 2025. Features interactive rigid-body stacking, cloth simulation, and six physically challenging scenarios that visualize orthogonal contact forces and penetration-free simulation in real-time.
- Unity 6
- C#
- Universal Render Pipeline
- InputSystem
- Physics3D
- TextMeshPro
- Position-Based Dynamics
This is an interactive educational demonstration of the Offset Geometric Contact paper—a novel contact simulation algorithm that guarantees penetration-free physics. The demo lets you spawn objects, watch them stack stably, and visualize contact forces as cyan arrows pointing perpendicular to surfaces. The key innovation: orthogonal forces eliminate stretching artifacts and enable large contact radii without instability, running 100× faster than competing methods like Incremental Potential Contact (IPC).
The project is split into two modes. Mode 1 covers basic interaction: drop objects onto a pre-built stack, change object types, toggle wind for cloth simulation, and observe contact visualization in real-time. Mode 2 adds six physically difficult scenarios—Newton's Cradle (momentum transfer), Jenga tower (stability under asymmetric loading), hanging chain (self-collision), domino effect (sequential contact), gear system (angular momentum), and thin-shell collapse (edge-edge contact)—each designed to stress-test aspects that typical engines handle poorly.
Implementation centers on position-based dynamics and custom constraint solving rather than Unity's built-in joints. A new OGCConstraint component replaces ConfigurableJoint for ropes and strings, using local distance constraints instead of global force-based solving. The ContactVisualizer renders contact points (green spheres) and orthogonal normals (cyan arrows) every frame, making the paper's core innovation immediately visible. All UI responds to keyboard input; the menu system includes one-click scene setup for both demo modes.
- Interactive object spawning with real-time contact visualization: green spheres for contact points, cyan arrows for orthogonal forces
- Six physically challenging scenarios (Newton's Cradle, Jenga, hanging chain, dominoes, gears, thin shells) stress-testing penetration-free guarantees
- Position-based dynamics constraint system (OGCConstraint) replacing Unity joints for stable, locally-solved multi-body systems
- Cloth simulation with wind effects and soft-body/rigid-body collision interaction
- Orbit camera, gravity slider, real-time stats display, and comprehensive in-game help system