Crates.io | resphys |
lib.rs | resphys |
version | 0.1.0 |
source | src |
created_at | 2020-09-30 01:38:49.500922 |
updated_at | 2020-09-30 01:38:49.500922 |
description | Simple 2D AABB only game collision detection/resolution engine. |
homepage | |
repository | https://github.com/RybekU/Resphys |
max_upload_size | |
id | 294412 |
size | 79,126 |
Simple 2D collision detection/resolution library supporting only AABB. Developed primarily to be used in my private projects and as learning opportunity.
The library currently only depenetrates the shapes, without modifying their velocities. Its goal isn't to provide a complete physics simulation, but rather to provide collision detection and resolution for simple games.
API breaking changes definitely will happen. The library is in no way production ready. It might be good enough for a gamejam, but may have some bugs. All issues are highly appreciated, including feedback and bug reports.
A physics solver is the component of physics engine that determines how collision resolution is performed. It's what determines most of the engine's 'feel'.
The solver used is very, very simple. The bodies move on each axis separately, first on x axis, later on y.
Body
(BodyDesc
) and Collider
(ColliderDesc
)Collider
's contactsCollision
/Overlap
event generationCollider
'sWorld
for overlap with arbitrary AABBWorld
for overlap with ray (Raycast)This library's API is inspired by nphysics, Box2D and to a lesser extent by the currently emerging rapier.
The implementations of most intersection and collision algorithms are heavily based on cute_c2.
All pull requests are welcome, however I want to treat your work with due respect so please file an issue first if it introduces any significant changes to existing functionality.