Skip to content
프로젝트

소개

빠르고 사용하기 쉬우며 종속성이 없는 C# 물리 엔진입니다. 명확하고 사용하기 편한 API를 제공합니다.

과학 및 공학

이 수치를 측정하는 방법

What you can do

  • Rigid-body and soft-body dynamics.
  • Single or double precision, selected at compile time.
  • Optional cross-platform deterministic solver for reproducible simulations.
  • Impulse-based solver with a semi-implicit Euler integrator and substepping.

측정된 스타 증가

in 24h
-1
in 7 days
+1
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

screenshot Jitter Physics 2

GitHub Actions Workflow Status Nuget Discord

Jitter Physics 2 is a fast, dependency-free physics engine written in C#, with rigid-body and soft-body dynamics. It runs across platforms supported by .NET and is the successor to Jitter Physics.

📦 Install Jitter2 from NuGet, or Jitter2.Double for double precision. See the changelog.

▶️ Try the interactive demo and explore the docs at jitterphysics.com.

Play Breakwater, a standalone first-person physics demo powered by Jitter2.


screenshot screenshot

screenshot screenshot

Getting Started

Add Jitter to your .NET project:

dotnet add package Jitter2

Create a world, add a box, and simulate one second with a fixed time step:

using System;
using Jitter2;
using Jitter2.Collision.Shapes;
using Jitter2.LinearMath;

using var world = new World();
world.Gravity = new JVector(0, -9.81f, 0);

var box = world.CreateRigidBody();
box.AddShape(new BoxShape(1, 1, 1));
box.Position = new JVector(0, 5, 0);

for (int i = 0; i < 60; i++)
{
    world.Step(1.0f / 60.0f);
}

Console.WriteLine(box.Position);

For a complete example with rendering, follow the falling boxes tutorial.

Running the Demos

The src directory contains four projects:

Project Description
Jitter2 Physics library.
JitterDemo Interactive OpenGL demos.
JitterBenchmark BenchmarkDotNet benchmarks.
JitterTests NUnit tests.

To run the demo scenes:

Install the .NET 10 SDK, then run:

git clone https://github.com/notgiven688/jitterphysics2.git
cd jitterphysics2/src/JitterDemo
dotnet run -c Release

JitterDemo uses GLFW for accessing OpenGL and managing windows, and VellumUI for the demo UI overlay. The project contains the GLFW native binaries in precompiled form.

Features

  • Rigid-body and soft-body dynamics.
  • Single or double precision, selected at compile time.
  • Optional cross-platform deterministic solver for reproducible simulations.
  • Impulse-based solver with a semi-implicit Euler integrator and substepping.
  • Continuous collision detection (CCD) with translation, rotation, and iterative contact discovery to reduce tunneling.
  • Constraints and motors with configurable softness.
  • Deactivation to reduce the cost of inactive rigid bodies.
  • Triangle meshes with filtering of internal edges.
  • Convex collision detection using EPA-aided MPR and one-shot contact manifolds.
  • Compound shapes and custom support mappings, alongside built-in boxes, spheres, capsules, cylinders, cones, convex hulls, point clouds, and triangles.

Documentation

Explore the documentation and interactive demo for tutorials, API details, and examples.

Credits

Grateful acknowledgment to Erin Catto, Dirk Gregorius, Erwin Coumans, Gino van den Bergen, Daniel Chappuis, Marijn Tamis, Danny Chapman, Gary Snethen, Ross Nordby, and Christer Ericson for sharing their knowledge through forum posts, talks, code, papers, and books.

Special thanks also to the contributors of the predecessor projects JigLibX and Jitter.

Contribute 👋

Contributions of all forms are welcome! Feel free to fork the project and create a pull request.

관련 프로젝트 살펴보기

불러오는 중…