feat: add support for Voxels collider (#823)

* feat: start adding voxels support and some additional testbed demo settings

* feat: add support for parry’s new Voxels collider shape

* fix voxels demos

* feat: support rectangular voxels and additional voxels initialization

* chore: switch to parry 0.20

* chore: fix cargo doc

* Fix testbed build
This commit is contained in:
Sébastien Crozet
2025-04-24 12:11:53 +02:00
committed by GitHub
parent 1c67c5e7f2
commit e44f636249
27 changed files with 891 additions and 223 deletions

View File

@@ -1014,18 +1014,20 @@ fn draw_contacts(_nf: &NarrowPhase, _colliders: &ColliderSet) {
#[cfg(feature = "dim3")]
fn setup_graphics_environment(mut commands: Commands) {
commands.insert_resource(AmbientLight {
brightness: 100.0,
brightness: 200.0,
..Default::default()
});
commands.spawn((
DirectionalLight {
shadows_enabled: false,
// shadows_enabled: true,
..Default::default()
},
Transform {
translation: Vec3::new(10.0, 2.0, 10.0),
rotation: Quat::from_rotation_x(-std::f32::consts::FRAC_PI_4),
translation: Vec3::new(-100.0, 200.0, -100.0),
rotation: Quat::from_rotation_x(
-(std::f32::consts::FRAC_PI_4 + std::f32::consts::FRAC_PI_6),
),
..Default::default()
},
));