You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,21 @@ Update it using `PhysicsBoxState.updateGravity(...)`.
39
39
## Boundaries
40
40
`BoundariesConfig` creates static walls around the container. This keeps bodies inside the visible area and lets you control restitution/friction at the edges.
41
41
42
+
!!! note "Boundary tunneling"
43
+
- Bodies can tunnel through boundaries when they cross a wall between simulation steps or when
44
+
the solver cannot resolve a deep overlap with a wall in time.
45
+
- Tunneling is more likely with thin walls, high velocity/impulse, strong drag or fling, large
46
+
gravity, low step frequency, low solver iterations, or bodies marked as non-bullet.
47
+
- Tunneling can also happen when large bodies are spawned at `(0, 0)` or near/outside the
48
+
container edge, because they can start intersecting the wall or already be partially beyond it.
49
+
- Spawning many bodies in the same point can create large overlap-correction impulses that push
50
+
bodies through boundaries.
51
+
- Increase `BoundariesConfig.thicknessPx` for larger or faster bodies, and use
52
+
`PhysicsBodyConfig.isBullet` for bodies that can move quickly.
53
+
- Use `PhysicsTransform` to spawn bodies away from walls and avoid initial intersections with
54
+
boundaries or other bodies. For multiple bodies, distribute their initial transforms instead of
0 commit comments