Aether.Physics2D.KNI 2.1.0

Prefix Reserved
dotnet add package Aether.Physics2D.KNI --version 2.1.0                
NuGet\Install-Package Aether.Physics2D.KNI -Version 2.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aether.Physics2D.KNI" Version="2.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aether.Physics2D.KNI --version 2.1.0                
#r "nuget: Aether.Physics2D.KNI, 2.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Aether.Physics2D.KNI as a Cake Addin
#addin nuget:?package=Aether.Physics2D.KNI&version=2.1.0

// Install Aether.Physics2D.KNI as a Cake Tool
#tool nuget:?package=Aether.Physics2D.KNI&version=2.1.0                

Aether.Physics2D

Aether.Physics2D is a 2D collision detection system.

Documentation: https://nkast.github.io/Aether.Physics2D/

Web Demos:

Features

  • Continuous collision detection (with time of impact solver)
  • Contact callbacks: begin, end, pre-solve, post-solve
  • Convex and concave polyons and circles.
  • Multiple shapes per body
  • Dynamic tree and quad tree broadphase
  • Fast broadphase AABB queries and raycasts
  • Collision groups and categories
  • Sleep management
  • Friction and restitution
  • Stable stacking with a linear-time solver
  • Revolute, prismatic, distance, pulley, gear, mouse joint, and other joint types
  • Joint limits and joint motors
  • Controllers (gravity, force generators)
  • Tools to decompose concave polygons, find convex hulls and boolean operations
  • Factories to simplify the creation of bodies

Usage

private World _world;
private Body _playerBody;
private Body _groundBody;
private float _playerBodyRadius = 1.5f / 2f; // player diameter is 1.5 meters
private Vector2 _groundBodySize = new Vector2(8f, 1f); // ground is 8x1 meters

//Create a world
_world = new World();

// Create the player
Vector2 playerPosition = new Vector2(0, _playerBodyRadius);
_playerBody = _world.CreateBody(playerPosition, 0, BodyType.Dynamic);
Fixture pfixture = _playerBody.CreateCircle(_playerBodyRadius, 1f);
// Give it some bounce and friction
pfixture.Restitution = 0.3f;
pfixture.Friction = 0.5f;

// Create the ground
Vector2 groundPosition = new Vector2(0, -(_groundBodySize.Y / 2f));
_groundBody = _world.CreateBody(groundPosition, 0, BodyType.Static);
Fixture gfixture = _groundBody.CreateRectangle(_groundBodySize.X, _groundBodySize.Y, 1f, Vector2.Zero);
gfixture.Restitution = 0.3f;
gfixture.Friction = 0.5f;

// Update the world
float dt = 1f/60f;
_world.Step(dt);

Sponsors ❤️

While Aether.Physics2D is free and open-source, maintaining and expanding the library requires ongoing effort and resources. We rely on the support of our community to continue delivering top-notch updates, features, and support. By becoming a Sponsor, you can directly contribute to the growth and sustainability of Aether.Physics2D.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Aether.Physics2D.KNI:

Package Downloads
Aether.Physics2D.Diagnostics.KNI

Aether.Physics2D is a 2D collision detection system.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.0 220 4/22/2024
2.0.0 172 4/20/2024