Collision
Vector operations and collision detection for polygons.
Implements the separating axis theorem for collision detection for polygons in 2D space.
Using regular polygons with an arbitrary number of sides and of an artbitrary size, can detect collisions and calculate the minimum translation vector to resolve collision.
Under development.
TODO:
- Additional collision detection methods.
- 3D collition detection
Installation
If available in Hex, the package can be installed as:
-
Add
collisionto your list of dependencies inmix.exs:
```elixir
def deps do
[{:collision, "~> 0.1.0"}]
end
```-
Ensure
collisionis started before your application:
```elixir
def application do
[applications: [:collision]]
end
```