Heron
An ergonomic physics API for 2d and 3d bevy games. (powered by rapier)
How it looks like
use *;
use *;
// Define your physics layers
Installation
For a 3d game:
= "^0.5.0"
= { = "0.9.0", = ["3d"] }
For a 2d game:
= "^0.5.0"
= { = "0.9.0", = ["2d"] }
Bevy Version Supported
bevy | heron |
---|---|
0.5 | >= 0.4 |
0.4 | < 0.4 |
Design principles
- Use bevy types, resources and components when possible (
Vec3
,Quat
,Transform
,Events
, etc.) - Provide a single API that works for both 2d and 3d. (Like bevy does)
- Data oriented. Using this library should look like it is part of bevy.
- Avoid asking the user to lookup in resources via handles. Data should be accessible and modifiable directly in components.
- Hide the actual physics engine. This is an implementation detail the user shouldn't have to care about.
- But, allow advanced users to access the underlying rapier resources, so a user is never blocked by a missing element in the API of heron.
Feature flags
One must choose to use either 2d
or 3d
(but not both). If none of theses two features is enabled, the PhysicsPlugin
won't be available.
Enabled by Default
3d
Enable simulation on the 3 axesx
,y
, andz
. Incompatible with the feature2d
.
Optional
2d
Enable simulation only on the first 2 axesx
andy
. Incompatible with the feature3d
, therefore require to disable the default features.debug
Render collision shapes. Works only in 2d, support for 3d will be added later.
Contribute / Contact
You can open issues/discussions here or you can discuss with me (Jomag#2675
) in the bevy discord