Skip to content

Commit

Permalink
manual revision 1 complete
Browse files Browse the repository at this point in the history
  • Loading branch information
erincatto committed May 28, 2024
1 parent 2806430 commit 29cc287
Show file tree
Hide file tree
Showing 9 changed files with 332 additions and 140 deletions.
2 changes: 1 addition & 1 deletion docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Box2D uses approximate methods for a few reasons.
What this means is that constraints are not perfectly rigid and sometimes you will see some bounce even when the restitution is zero.
Box2D uses [Gauss-Seidel](https://en.wikipedia.org/wiki/Gauss%E2%80%93Seidel_method) to approximately solve constraints.
Box2D also uses [Semi-implicit Euler](https://en.wikipedia.org/wiki/Semi-implicit_Euler_method) to approximately solve the differential equations.
Box2D also does not have exact collision. There is no continuous collision between dynamic shapes. Slow moving shapes may have small overlap for a few time steps. In extreme stacking scenarios, shapse may have sustained overlap.
Box2D also does not have exact collision. There is no continuous collision between dynamic shapes. Slow moving shapes may have small overlap for a few time steps. In extreme stacking scenarios, shapes may have sustained overlap.

## Making Games

Expand Down
6 changes: 3 additions & 3 deletions docs/collision.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Degenerate points may be coincident and/or collinear. For the hull to be viable,

### Segments
Segments are line segments. Segment
shapes can collide with circles, capsules, and polygons but not with other line segemnts.
shapes can collide with circles, capsules, and polygons but not with other line segments.
The collision algorithms used by Box2D require that at least
one of two colliding shapes has sufficiently positive area. Segment shapes have no area, so
segment-segment collision is not possible.
Expand Down Expand Up @@ -246,7 +246,7 @@ Even more generic, you can use `b2ShapeCast()` to linearly cast one point cloud
`b2ShapeDistance()` function can be used to compute the distance between two
shapes. The distance function needs both shapes to be converted into a
`b2DistanceProxy` (which are point clouds with radii). There is also some caching used to warm start the
distance function for repeated calls. This can improve performance when the shapes move by small amounds.
distance function for repeated calls. This can improve performance when the shapes move by small amounts.
![Distance Function](images/distance.svg)
Expand Down Expand Up @@ -323,7 +323,7 @@ A region query uses the tree to find all leaf AABBs that overlap a query
AABB. This is faster than a brute force approach because many shapes can
be skipped.
![Raycast](images/raycast.svg){html: width=30%}
![Ray-cast](images/raycast.svg){html: width=30%}
![Overlap Test](images/overlap_test.svg){html: width=30%}
Expand Down
2 changes: 1 addition & 1 deletion docs/foundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ So when you design your game loop, you should let Box2D *go wide* and use multip
> While Box2D is designed for multithreading, its interface is *not* thread-safe. Modifying
> the Box2D world during simulation or from multiple threads will result in a [race condition](https://en.wikipedia.org/wiki/Race_condition).
It *is safe* to do raycasts, shapecasts, and overlap tests from multiple threads outside of `b2World_Step()`. Generally, any read-only operation is safe to do multithreaded outside of `b2World_Step()`. This can be very useful if you have multithreaded game logic.
It *is safe* to do ray-casts, shape-casts, and overlap tests from multiple threads outside of `b2World_Step()`. Generally, any read-only operation is safe to do multithreaded outside of `b2World_Step()`. This can be very useful if you have multithreaded game logic.
2 changes: 1 addition & 1 deletion docs/hello.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ don't move a shape around on the body. Moving or modifying a shape that
is on a body is possible with certain functions, but it should not be part
of normal simulation. The reason is simple: a body with
morphing shapes is not a rigid body, but Box2D is a rigid body engine.
Many of the alogirthms in Box2D are based on the rigid body model.
Many of the algorithms in Box2D are based on the rigid body model.
If this is violated you may get unexpected behavior.
## Creating a Dynamic Body
Expand Down
183 changes: 183 additions & 0 deletions docs/images/center_of_mass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions docs/loose_ends.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ If you use a conversion factor, you should try tweaking it globally to
make sure nothing breaks. You can also try adjusting it to improve
stability.

If this conversion is not possible, you can set the lenght units used
If this conversion is not possible, you can set the length units used
by Box2D using `b2SetLengthUnitsPerMeter()`. This is experimental and not
well tested.

Expand All @@ -102,6 +102,7 @@ efficiently. This brings some limitations.
Here are the current limitations:
1. Extreme mass ratios may cause joint stretching and collision overlap.
2. Box2D uses soft constraints to improve robustness. This can lead to joint and contact flexing.
3. Continuous collision does not handle joints. So you may see joint stretching on fast moving objects. Normally this recovers.
4. Box2D uses the symplectic Euler integration scheme. It does not reproduce exact parabolic motion of projectiles and has only first-order accuracy. However it is fast and has good stability.
5. Box2D uses a squential solver to provide real-time performance. You will not get precisely rigid collisions or pixel perfect accuracy. Increasing the sub-step count will improve accuracy.
3. Continuous collision does not handle all situations. For example, general dynamic versus dynamic continuous collision is not handled. [Bullets](#bullets) handle this in a limited way. This is done for performance reasons.
4. Continuous collision does not handle joints. So you may see joint stretching on fast moving objects. Usually the joints recover after a few time steps.
5. Box2D uses the [semi-implicit Euler method](https://en.wikipedia.org/wiki/Semi-implicit_Euler_method) to solve the [equations of motion](https://en.wikipedia.org/wiki/Equations_of_motion). It does not reproduce exactly the parabolic motion of projectiles and has only first-order accuracy. However it is fast and has good stability.
6. Box2D uses a the [Gauss-Seidel method](https://en.wikipedia.org/wiki/Gauss%E2%80%93Seidel_method) to solve constraints and achieve real-time performance. You will not get precisely rigid collisions or pixel perfect accuracy. Increasing the sub-step count will improve accuracy.
Loading

0 comments on commit 29cc287

Please sign in to comment.