Skip to content

Commit 55786cb

Browse files
Merge pull request #5 from GoetzDeBouville/dev
update docs
2 parents 4e45804 + d968b56 commit 55786cb

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

README.MD

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ Inspired by [PhysicsLayout](https://github.com/Jawnnypoo/PhysicsLayout/).
1717

1818
## Demo Screencast
1919

20-
[![Android demo](demoVideo/android_demo.gif)](demoVideo/android_demo.mp4)
21-
[![Desktop demo 1](demoVideo/desktop_demo0.gif)](demoVideo/desktop_demo0.mp4)
22-
[![Desktop demo 2](demoVideo/desktop_demo2.gif)](demoVideo/desktop_demo2.mp4)
20+
<a href="demoVideo/android_demo.mp4">
21+
<img src="demoVideo/android_demo.gif" alt="PhysicsBox Demo Android" width="15%" />
22+
</a>
23+
<a href="demoVideo/desktop_demo0.mp4">
24+
<img src="demoVideo/desktop_demo0.gif" alt="PhysicsBox Demo Desktop" width="47%" />
25+
</a>
26+
<a href="demoVideo/desktop_demo2.mp4">
27+
<img src="demoVideo/desktop_demo2.gif" alt="PhysicsBox Demo2 Desktop" width="47%" />
28+
</a>
2329

2430
## Quick Start
2531

docs/concepts.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@ Update it using `PhysicsBoxState.updateGravity(...)`.
3939
## Boundaries
4040
`BoundariesConfig` creates static walls around the container. This keeps bodies inside the visible area and lets you control restitution/friction at the edges.
4141

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
55+
placing all of them at the same position.
56+
4257
## Units and coordinate system
4358
- Screen‑oriented axes: **+X right**, **+Y down**
4459

0 commit comments

Comments
 (0)