give collectibales physics layer
this keeps keys, dropped-hedz and cash from "colliding" with the camera arm
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use crate::{
|
||||
GameState, billboards::Billboard, global_observer, loading_assets::GameAssets, player::Player,
|
||||
sounds::PlaySound, squish_animation::SquishAnimation,
|
||||
GameState, billboards::Billboard, global_observer, loading_assets::GameAssets,
|
||||
physics_layers::GameLayer, player::Player, sounds::PlaySound,
|
||||
squish_animation::SquishAnimation,
|
||||
};
|
||||
use avian3d::prelude::*;
|
||||
use bevy::prelude::*;
|
||||
@@ -40,6 +41,7 @@ fn on_head_drop(trigger: Trigger<HeadDrops>, mut commands: Commands, assets: Res
|
||||
ExternalImpulse::new(spawn_dir * 180.).with_persistence(false),
|
||||
LockedAxes::ROTATION_LOCKED,
|
||||
RigidBody::Dynamic,
|
||||
CollisionLayers::new(LayerMask(GameLayer::Collectibles.to_bits()), LayerMask::ALL),
|
||||
CollisionEventsEnabled,
|
||||
Restitution::new(0.6),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user