Skip to content

Commit 42975bd

Browse files
authored
Document possible Ghost Collisions on the Collider::trimesh_from_mesh method
1 parent cbc9a21 commit 42975bd

File tree

1 file changed

+12
-0
lines changed
  • src/collision/collider/parry

1 file changed

+12
-0
lines changed

src/collision/collider/parry/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,12 @@ impl Collider {
11871187
/// The [`CollisionMargin`] component can be used to add thickness to the shape if needed.
11881188
/// For thin shapes like triangle meshes, it can help improve collision stability and performance.
11891189
///
1190+
/// When encountering issues with
1191+
/// [Ghost Collisions](https://box2d.org/posts/2020/06/ghost-collisions/) where bodies collide
1192+
/// with the internal edges of the trimesh, set the flag [`TrimeshFlags::FIX_INTERNAL_EDGES`] via
1193+
/// [`Self::trimesh_from_mesh_with_config`]. Note that this will only fix the issues with the
1194+
/// internal edges of a trimesh, not with boundary edges between two different colliders.
1195+
///
11901196
/// # Example
11911197
///
11921198
/// ```
@@ -1223,6 +1229,12 @@ impl Collider {
12231229
/// The [`CollisionMargin`] component can be used to add thickness to the shape if needed.
12241230
/// For thin shapes like triangle meshes, it can help improve collision stability and performance.
12251231
///
1232+
/// When encountering issues with
1233+
/// [Ghost Collisions](https://box2d.org/posts/2020/06/ghost-collisions/) where bodies collide
1234+
/// with the internal edges of the trimesh, set the flag [`TrimeshFlags::FIX_INTERNAL_EDGES`].
1235+
/// Note that this will only fix the issues with the internal edges of a trimesh, not with
1236+
/// boundary edges between two different colliders.
1237+
///
12261238
/// # Example
12271239
///
12281240
/// ```

0 commit comments

Comments
 (0)