diff --git a/content/broad_phase/spatial_hash.md b/content/broad_phase/spatial_hash.md index 0965116..d50273d 100644 --- a/content/broad_phase/spatial_hash.md +++ b/content/broad_phase/spatial_hash.md @@ -34,7 +34,7 @@ hash.Insert(1, rect, rectTransform); To find potential collisions, use the **Retrieve** method and give an ID, an IShape2D, and a Transform2D. ```cs -hash.Retrieve(1, rectB, rectBTransform); +hash.Retrieve(1, rect, rectTransform); ``` In this example, the above method call returns an *IEnumerable<(T, IShape2D, Transform)>* containing the circle information we inserted. diff --git a/content/narrow_phase/GJK2D.md b/content/narrow_phase/GJK2D.md index 3df61b9..8a94823 100644 --- a/content/narrow_phase/GJK2D.md +++ b/content/narrow_phase/GJK2D.md @@ -6,7 +6,7 @@ weight: 10 Bonk uses the Gilbert-Johnson-Keerthi, or GJK, algorithm to perform narrow phase collision detection. -To accurately check a collision, you must pass two sets of shapes and transforms. Remember that a transform operates on the vertices of a shape: it moves, rotates, and scales them in 2D space. +To accurately check a collision, you must pass two sets of shapes and transforms to the *GJK2D.TestCollision* method. Remember that a transform operates on the vertices of a shape: it moves, rotates, and scales them in 2D space. ```cs var circleA = new Circle(2); diff --git a/content/transform/Position2D.md b/content/transform/Position2D.md index fb5dd76..5bad2e9 100644 --- a/content/transform/Position2D.md +++ b/content/transform/Position2D.md @@ -12,7 +12,7 @@ This can present us with problems when it comes to game physics. If your charact To avoid these problems, I created the *Position2D* struct. *Position2D* maintains an integer X and Y position, as well as X and Y fractional carryover. Whenever numbers with fractional values are added to the position, the fractional values are added to the carryover. Once the carryover value reaches 1, it is added to the coordinate. This means that we can treat positions as integer values without sacrificing precision. -This means that in our physics calculations, we will never have discrepancies between internal game position logic and rendering. +Therefore, in our physics calculations, we will never have discrepancies between internal game position logic and rendering. ```cs var one = new Position2D(1.3f, 3.5f); diff --git a/content/transform/Transform2D.md b/content/transform/Transform2D.md index 61e3da2..a4f0fa0 100644 --- a/content/transform/Transform2D.md +++ b/content/transform/Transform2D.md @@ -10,4 +10,4 @@ To create a *Transform2D*, you must provide a *Position2D* or a *Vector2* for tr var transform = new Transform2D(new Position2D(4, 1), 5f, new Vector2(3, 1)); ``` -The following section will describe how to use Shapes in conjunction with Transforms to perform collision detection. \ No newline at end of file +The following section will describe how to use an *IShape2D* in conjunction with *Transform2D* to perform collision detection. \ No newline at end of file