aboutsummaryrefslogtreecommitdiff
path: root/examples3d
diff options
context:
space:
mode:
authorSébastien Crozet <sebcrozet@dimforge.com>2024-04-28 15:53:49 +0200
committerSébastien Crozet <sebastien@crozet.re>2024-04-30 23:10:46 +0200
commit929aa6b9259b95d48cf6a84df40486132b21f088 (patch)
treed50e3f483154ef33226eb2de25c5a54ff898d52f /examples3d
parent97f7c1b4b22c5ea29f5a34b5d02563dca4b0da35 (diff)
downloadrapier-929aa6b9259b95d48cf6a84df40486132b21f088.tar.gz
rapier-929aa6b9259b95d48cf6a84df40486132b21f088.tar.bz2
rapier-929aa6b9259b95d48cf6a84df40486132b21f088.zip
feat: rename collision_skin to contact_skin
Diffstat (limited to 'examples3d')
-rw-r--r--examples3d/dynamic_trimesh3.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples3d/dynamic_trimesh3.rs b/examples3d/dynamic_trimesh3.rs
index 0e24698..8d71899 100644
--- a/examples3d/dynamic_trimesh3.rs
+++ b/examples3d/dynamic_trimesh3.rs
@@ -36,8 +36,7 @@ pub fn do_init_world(testbed: &mut Testbed, use_convex_decomposition: bool) {
-(i as f32 * 40.0 / (nsubdivs as f32) / 2.0).cos()
- (j as f32 * 40.0 / (nsubdivs as f32) / 2.0).cos()
});
- let heightfield =
- HeightField::new(heights, vector![100.0, 2.0, 100.0]);
+ let heightfield = HeightField::new(heights, vector![100.0, 2.0, 100.0]);
let mut trimesh = TriMesh::from(heightfield);
trimesh.set_flags(TriMeshFlags::FIX_INTERNAL_EDGES);
colliders.insert(ColliderBuilder::new(SharedShape::new(trimesh.clone())));
@@ -101,7 +100,8 @@ pub fn do_init_world(testbed: &mut Testbed, use_convex_decomposition: bool) {
// let compound = SharedShape::compound(compound_parts);
for k in 1..num_duplications + 1 {
- let x = (igeom % width) as f32 * shift_xz - num_duplications as f32 * shift_xz / 2.0;
+ let x =
+ (igeom % width) as f32 * shift_xz - num_duplications as f32 * shift_xz / 2.0;
let y = (igeom / width) as f32 * shift_y + 7.0;
let z = k as f32 * shift_xz - num_duplications as f32 * shift_xz / 2.0;
@@ -109,7 +109,7 @@ pub fn do_init_world(testbed: &mut Testbed, use_convex_decomposition: bool) {
let handle = bodies.insert(body);
for shape in &shapes {
- let collider = ColliderBuilder::new(shape.clone()).collision_skin(0.1);
+ let collider = ColliderBuilder::new(shape.clone()).contact_skin(0.1);
colliders.insert_with_parent(collider, handle, &mut bodies);
}
}