Cargo Features

[dependencies]
avian2d = { version = "0.1.2", default-features = false, features = ["2d", "f32", "f64", "debug-plugin", "simd", "parallel", "enhanced-determinism", "default-collider", "parry-f32", "parry-f64", "bevy_scene", "serialize"] }
default = 2d, bevy_scene, debug-plugin, f32, parallel, parry-f32

These default features are set whenever avian2d is added without default-features = false somewhere in the dependency tree.

2d default

Affects collision::Contacts.total_tangent_impulse, collision::ContactData.tangent_impulse, mass_properties::Inertia, mass_properties::InverseInertia, rigid_body::AngularVelocity, tangent_part::TangentImpulse, tangent_part::ContactTangentPart.effective_mass, angular_constraint::AngularConstraint.apply_angular_lagrange_update, angular_constraint::AngularConstraint.apply_angular_impulse, angular_constraint::AngularConstraint.align_orientation, angular_constraint::AngularConstraint.apply_angular_correction, angular_constraint::AngularConstraint.compute_generalized_inverse_mass, angular_constraint::AngularConstraint.get_delta_rot, angular_constraint::AngularConstraint.compute_torque, positional_constraint::PositionConstraint.compute_generalized_inverse_mass, positional_constraint::PositionConstraint.get_delta_rot, double::Vector, double::Matrix, math::DIM, single::Vector

f32 default parry-f32
f64 parry-f64?
debug-plugin default

Enables bevy_gizmos and bevy_render of bevy

Affects avian2d::debug_render

simd

Enables simd-stable of optional parry2d ^0.15 and optional parry2d-f64 ^0.15

parallel default

Enables parallel of optional parry2d ^0.15 and optional parry2d-f64 ^0.15

enhanced-determinism

Enables libm, enhanced-determinism of optional parry2d ^0.15 and optional parry2d-f64 ^0.15 and libm of bevy_math

bevy_math:

Enable libm mathematical functions for glam types to ensure consistent outputs across platforms at the cost of losing hardware-level optimization using intrinsics

default-collider parry-f32 parry-f64?

Enables nalgebra ^0.32.6

Affects collision::contact_query, gizmos::PhysicsGizmoExt.draw_collider, gizmos::PhysicsGizmoExt.draw_shapecast

parry-f32 default = default-collider, f32

We unfortunately can't reuse the f32 and f64 features for this,
because Parry uses separate crates for f32 and f64.

Enables parry2d ^0.15

Affects collision::contact_query, gizmos::PhysicsGizmoExt.draw_collider, gizmos::PhysicsGizmoExt.draw_shapecast

parry-f64 = default-collider, f64

Enables parry2d-f64 ^0.15

Affects collision::contact_query, gizmos::PhysicsGizmoExt.draw_collider, gizmos::PhysicsGizmoExt.draw_shapecast

bevy_scene default

Enables bevy_scene of bevy

bevy:

Provides scene functionality

serialize

Enables serde, serde-serialize of optional parry2d ^0.15 and optional parry2d-f64 ^0.15 and serialize of bevy

bevy:

Enable serialization support through serde