generated from 2ndbeam/bevy-template
feat: Hidden collider bounds behind colliders feat
- Bump version to 0.4.0 - Fix lamp SpotLight position
This commit is contained in:
parent
c1f9c29fe7
commit
926c4e6644
4 changed files with 17 additions and 15 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -2528,7 +2528,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "expedition_demo"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"bevy_common_assets",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ cargo-features = ["codegen-backend"]
|
|||
|
||||
[package]
|
||||
name = "expedition_demo"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
|
|
@ -10,12 +10,15 @@ bevy = { version = "0.18.0", features = ["bevy_remote", "debug", "experimental_b
|
|||
bevy_common_assets = { version = "0.15.0", features = ["toml"] }
|
||||
bevy_input = { version = "0.18.0", features = ["serde", "serialize"] }
|
||||
bevy_light_2d = "0.9.0"
|
||||
bevy_rapier2d = { version = "0.33.0", features = ["rapier-debug-render"] }
|
||||
bevy_rapier2d = { version = "0.33.0" }
|
||||
clap = { version = "4.6.0", features = ["derive"] }
|
||||
leafwing-input-manager = "0.20.0"
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
toml = "1.0.3"
|
||||
|
||||
[features]
|
||||
colliders = ["bevy_rapier2d/rapier-debug-render"]
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 1
|
||||
codegen-backend = "cranelift"
|
||||
|
|
|
|||
|
|
@ -10,19 +10,17 @@ pub struct Lamp;
|
|||
|
||||
pub fn lamp_bundle(textures: &Res<LayoutTextures>, pos: Vec2, intensity: f32, radius: f32) -> impl Bundle {
|
||||
(
|
||||
SpotLight2d {
|
||||
intensity,
|
||||
radius,
|
||||
source_width: meters(0.5),
|
||||
cast_shadows: true,
|
||||
..default()
|
||||
},
|
||||
Transform::from_xyz(pos.x, pos.y, 0.),
|
||||
Sprite::from_image(textures.light.0.clone()),
|
||||
children![
|
||||
(
|
||||
|
||||
)
|
||||
],
|
||||
children![(
|
||||
SpotLight2d {
|
||||
intensity,
|
||||
radius,
|
||||
source_width: meters(0.5),
|
||||
cast_shadows: true,
|
||||
..default()
|
||||
},
|
||||
Transform::from_xyz(0., 1., 0.),
|
||||
)],
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ impl Plugin for ExpeditionPlugin {
|
|||
},
|
||||
};
|
||||
app.add_plugins((
|
||||
#[cfg(feature = "colliders")]
|
||||
RapierDebugRenderPlugin::default(),
|
||||
RapierPhysicsPlugin::<()>::default()
|
||||
.with_custom_initialization(rapier_init),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue