tirbofish/dropbear · commit
e6110fc6ffed9403bc908173ce760ee624a38cd4
wip: got doc build working
Signature present but could not be verified.
Unverified
@@ -161,7 +161,7 @@ impl PhysicsState { let mut builder = match &collider_component.shape { ColliderShape::Box { half_extents } => { - ColliderBuilder::cuboid(half_extents[0], half_extents[1], half_extents[2]) + ColliderBuilder::cuboid(half_extents.x as f32, half_extents.y as f32, half_extents.z as f32) } ColliderShape::Sphere { radius } => { ColliderBuilder::ball(*radius) @@ -457,7 +457,7 @@ fn shape_cast( let cast_shape = { match shape { crate::physics::collider::ColliderShape::Box { half_extents } => { - rapier3d::geometry::SharedShape::cuboid(half_extents[0], half_extents[1], half_extents[2]) + rapier3d::geometry::SharedShape::cuboid(half_extents.x as f32, half_extents.y as f32, half_extents.z as f32) } crate::physics::collider::ColliderShape::Sphere { radius } => rapier3d::geometry::SharedShape::ball(*radius), crate::physics::collider::ColliderShape::Capsule { half_height, radius } => { @@ -135,9 +135,9 @@ impl From<&ColliderShape> for ColliderShapeKey { match *shape { ColliderShape::Box { half_extents } => Self::Box { half_extents_bits: [ - half_extents[0].to_bits(), - half_extents[1].to_bits(), - half_extents[2].to_bits(), + half_extents.x.to_bits() as u32, + half_extents.y.to_bits() as u32, + half_extents.z.to_bits() as u32, ], }, ColliderShape::Sphere { radius } => Self::Sphere { @@ -164,7 +164,7 @@ impl From<&ColliderShape> for ColliderShapeKey { #[dropbear_macro::repr_c_enum] pub enum ColliderShape { /// Box shape with half-extents (half-width, half-height, half-depth). - Box { half_extents: [f32; 3] }, + Box { half_extents: NVector3 }, /// Sphere shape with radius. Sphere { radius: f32 }, @@ -182,7 +182,7 @@ pub enum ColliderShape { impl Default for ColliderShape {
Large diffs are not rendered by default. Showing the first 50 of 693 lines. Show full diff