32 lines
751 B
Rust
Executable file
32 lines
751 B
Rust
Executable file
//bevy system signatures often violate these rules
|
|
#![allow(clippy::type_complexity)]
|
|
#![allow(clippy::too_many_arguments)]
|
|
|
|
use avian3d::prelude::*;
|
|
use bevy::prelude::*;
|
|
|
|
pub struct PhysicsPlugin;
|
|
|
|
impl Plugin for PhysicsPlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app.add_plugins((
|
|
PhysicsPlugins::default().set(PhysicsInterpolationPlugin::interpolate_all()),
|
|
PhysicsPickingPlugin,
|
|
))
|
|
.insert_resource(PhysicsPickingSettings {
|
|
require_markers: true,
|
|
});
|
|
}
|
|
}
|
|
|
|
#[derive(PhysicsLayer, Default, Clone, Copy, Debug, PartialEq, Eq, Reflect)]
|
|
pub enum PhysicsLayers {
|
|
#[default]
|
|
Ground,
|
|
Core,
|
|
Inhabitant,
|
|
Projectiles,
|
|
}
|
|
|
|
#[derive(Component)]
|
|
pub struct Ground;
|