summaryrefslogtreecommitdiff
path: root/2d/_collisions/polygon_polygon.html.content
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-06-27 15:24:07 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-06-27 15:24:07 -0400
commit52d43a63d02e973f28aa30b768eddc042a4f155b (patch)
tree852de9a02ff9c6298c5b41dcc466786ed8af3be6 /2d/_collisions/polygon_polygon.html.content
parent28d0d84638ba1ba45696f3fa86cb18e694f280a5 (diff)
Some minor updates to SAT explanation, and made icons work everywhere
Diffstat (limited to '2d/_collisions/polygon_polygon.html.content')
-rw-r--r--2d/_collisions/polygon_polygon.html.content6
1 files changed, 4 insertions, 2 deletions
diff --git a/2d/_collisions/polygon_polygon.html.content b/2d/_collisions/polygon_polygon.html.content
index 7f29ae0..29c284d 100644
--- a/2d/_collisions/polygon_polygon.html.content
+++ b/2d/_collisions/polygon_polygon.html.content
@@ -107,13 +107,15 @@
<li>If the projections overlap for each edge of both shapes, the shapes are intersecting. Return true.</li>
</ol>
- And that is all there is to <i>finding</i> the intersection between two convex polygons.
+ And that is all there is to <i>finding</i> the intersection between two convex polygons. Here is the code snippet that does this if you are interested:
+
+ #SNIPPET polygon_polygon/snippet1.cpp
</p>
</section>
<section>
<h2>SAT Collision Resolution</h2>
<p>
- Now that we know our objects have intersecting, we want to be able to send them tumbling away from each other to simulate a collision. To do this, we will need to find the following things:
+ Now that we know our objects have intersected, we want to be able to send them tumbling away from each other to simulate a collision. To do this, we will need to find the following things:
<ul>
<li><b>Collision Normal</b>: in what direction, point towards object <b>A</b>, did the polygons intersect</li>
<li><b>Point of Application</b>: at what point on each object did the objects first intersect</li>