Aether.Physics2D.MG
2.1.1
Prefix Reserved
dotnet add package Aether.Physics2D.MG --version 2.1.1
NuGet\Install-Package Aether.Physics2D.MG -Version 2.1.1
<PackageReference Include="Aether.Physics2D.MG" Version="2.1.1" />
paket add Aether.Physics2D.MG --version 2.1.1
#r "nuget: Aether.Physics2D.MG, 2.1.1"
// Install Aether.Physics2D.MG as a Cake Addin #addin nuget:?package=Aether.Physics2D.MG&version=2.1.1 // Install Aether.Physics2D.MG as a Cake Tool #tool nuget:?package=Aether.Physics2D.MG&version=2.1.1
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 | Versions 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 was computed. 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 | 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. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Aether.Physics2D.MG:
Package | Downloads |
---|---|
Aether.Physics2D.Diagnostics.MG
Aether.Physics2D is a 2D collision detection system. |
|
Fury.MG.Physics.Aether
The monogame render wrapper implementation for games. |
|
Curupira2D
https://raw.githubusercontent.com/RonildoSouza/Curupira2D/main/README.md |
GitHub repositories
This package is not used by any popular GitHub repositories.