# Jolt Physics — High-Performance Rigid Body Physics Engine > A multi-core friendly C++ physics and collision detection library used in Horizon Forbidden West and other AAA games, designed for speed and determinism. ## Install Save as a script file and run: # Jolt Physics — High-Performance Rigid Body Physics Engine ## Quick Use ```bash git clone https://github.com/jrouwe/JoltPhysics.git cd JoltPhysics/Build cmake -B build -DCMAKE_BUILD_TYPE=Release cmake --build build -j$(nproc) # Run the samples ./build/Samples/Samples ``` ## Introduction Jolt Physics is a C++ rigid body physics library that prioritizes multi-core performance, determinism, and simulation stability. It was developed to meet the demands of AAA game production and has been battle-tested in titles like Horizon Forbidden West and Death Stranding 2. ## What Jolt Physics Does - Simulates rigid body dynamics with continuous collision detection - Supports convex and concave shapes, height fields, and compound colliders - Provides constraints including hinges, sliders, cones, and ragdolls - Parallelizes the simulation pipeline across multiple CPU cores - Delivers deterministic results for the same input across platforms ## Architecture Overview Jolt splits the simulation into broad-phase (spatial partitioning via a layered bounding volume hierarchy), narrow-phase (GJK/EPA for collision detection), and constraint solving (an iterative velocity solver). Work is distributed across threads using a job system with fine-grained tasks, enabling near-linear scaling on multi-core CPUs. ## Self-Hosting & Configuration - Build with CMake on Windows, macOS, Linux, Android, iOS, and WebAssembly - Add as a submodule or use CMake FetchContent in your project - Configure simulation layers and collision filters via the object layer system - Tune solver iterations, gravity, and time step in PhysicsSystem settings - Optional debug renderer draws wireframe shapes for visual debugging ## Key Features - Multi-core job system scales simulation across all available CPU cores - Deterministic simulation produces identical results given identical input - Continuous collision detection prevents fast objects from tunneling through geometry - Soft body support for cloth and deformable object simulation - Compact memory layout designed for cache efficiency ## Comparison with Similar Tools - **Bullet** — Mature and widely used; Jolt is newer with better multi-core scaling - **PhysX** — NVIDIA proprietary; Jolt is MIT-licensed and vendor-independent - **Havok** — Commercial middleware; Jolt is free and open source - **Box2D** — 2D only; Jolt is a full 3D rigid body engine - **Rapier** — Rust-based physics; Jolt targets C++ with proven AAA production use ## FAQ **Q: Is Jolt Physics production-ready?** A: Yes. It ships in AAA games including Horizon Forbidden West and Death Stranding 2 by Guerrilla Games and Kojima Productions. **Q: Does Jolt support soft bodies?** A: Yes. Jolt includes soft body simulation for cloth, pressure-based volumes, and deformable meshes. **Q: Can I use Jolt with engines other than custom ones?** A: Community integrations exist for Godot, Bevy, and other engines. The library is engine-agnostic and designed for easy embedding. **Q: How does determinism work across platforms?** A: Jolt avoids platform-dependent floating point behavior and guarantees bitwise identical results when given the same input and configuration, regardless of operating system. ## Sources - https://github.com/jrouwe/JoltPhysics - https://jrouwe.github.io/JoltPhysics/ --- Source: https://tokrepo.com/en/workflows/asset-7b9ec73b Author: Script Depot