aboutsummaryrefslogtreecommitdiff
path: root/examples3d/stacks3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples3d/stacks3.rs')
-rw-r--r--examples3d/stacks3.rs36
1 files changed, 6 insertions, 30 deletions
diff --git a/examples3d/stacks3.rs b/examples3d/stacks3.rs
index fd2ae27..55d58bb 100644
--- a/examples3d/stacks3.rs
+++ b/examples3d/stacks3.rs
@@ -27,9 +27,8 @@ fn create_tower_circle(
// Build the rigid body.
let rigid_body = RigidBodyBuilder::new_dynamic().position(pos).build();
let handle = bodies.insert(rigid_body);
- let collider = ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z)
- .density(1.0)
- .build();
+ let collider =
+ ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z).build();
colliders.insert(collider, handle, bodies);
}
}
@@ -55,9 +54,8 @@ fn create_wall(
// Build the rigid body.
let rigid_body = RigidBodyBuilder::new_dynamic().translation(x, y, z).build();
let handle = bodies.insert(rigid_body);
- let collider = ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z)
- .density(1.0)
- .build();
+ let collider =
+ ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z).build();
colliders.insert(collider, handle, bodies);
}
}
@@ -88,9 +86,7 @@ fn create_pyramid(
let rigid_body = RigidBodyBuilder::new_dynamic().translation(x, y, z).build();
let handle = bodies.insert(rigid_body);
let collider =
- ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z)
- .density(1.0)
- .build();
+ ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z).build();
colliders.insert(collider, handle, bodies);
}
}
@@ -124,27 +120,7 @@ pub fn init_world(testbed: &mut Testbed) {
let cube_size = 1.0;
let hext = Vector3::repeat(cube_size);
let bottomy = cube_size * 50.0;
- create_pyramid(
- &mut bodies,
- &mut colliders,
- Vector3::new(-110.0, bottomy, 0.0),
- 12,
- hext,
- );
- create_pyramid(
- &mut bodies,
- &mut colliders,
- Vector3::new(-80.0, bottomy, 0.0),
- 12,
- hext,
- );
- create_pyramid(
- &mut bodies,
- &mut colliders,
- Vector3::new(-50.0, bottomy, 0.0),
- 12,
- hext,
- );
+
create_pyramid(
&mut bodies,
&mut colliders,