M Cargo.lock => Cargo.lock +4 -0
@@ 1071,6 1071,8 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41c76ebff351c2123628086ccef32fb9ae476519dc13f605d3680c17da5c40fb"
dependencies = [
+ "rand_chacha 0.9.0",
+ "rand_core 0.6.4",
"rand_core 0.9.3",
"wyrand",
]
@@ 1091,6 1093,8 @@ dependencies = [
"bevy_ecs",
"bevy_prng",
"getrandom 0.3.3",
+ "rand_chacha 0.9.0",
+ "rand_core 0.6.4",
"rand_core 0.9.3",
]
M crates/bevy_dice/Cargo.toml => crates/bevy_dice/Cargo.toml +3 -0
@@ 26,6 26,9 @@ bevy = { version = "0.16", default-features = false, features = [
"std",
] }
bevy_rand = { version = "0.11", default-features = false, features = [
+ "compat",
+ "std",
+ "thread_local_entropy",
"wyrand",
] }
lazy_static = "1"
M crates/bevy_dice/src/lib.rs => crates/bevy_dice/src/lib.rs +3 -1
@@ 158,7 158,9 @@ fn throw_die(
)],
Transform {
translation: Vec3::new(0.0, 4.0, 0.0),
- //rotation: Quat::from_rng(rng.as_mut()),
+ rotation: trigger
+ .rotation
+ .unwrap_or_else(|| Quat::from_rng(rng.as_mut())),
..Default::default()
},
RigidBody::Dynamic,