kitgit

tirbofish/dropbear · diff

e6110fc · Thribhu K

wip: got doc build working

Unverified

diff --git a/crates/eucalyptus-core/src/physics.rs b/crates/eucalyptus-core/src/physics.rs
index e49d3e8..b7c0f1f 100644
--- a/crates/eucalyptus-core/src/physics.rs
+++ b/crates/eucalyptus-core/src/physics.rs
@@ -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 } => {
diff --git a/crates/eucalyptus-core/src/physics/collider.rs b/crates/eucalyptus-core/src/physics/collider.rs
index 76470a0..252ed5b 100644
--- a/crates/eucalyptus-core/src/physics/collider.rs
+++ b/crates/eucalyptus-core/src/physics/collider.rs
@@ -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