summaryrefslogtreecommitdiff
path: root/2d
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-07-01 18:46:13 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-07-01 18:46:13 -0400
commit9f968320c83ce79f98006dec71674feff4686e3b (patch)
tree303ee3791d88f747a1a3c9579c564436ecfde7b2 /2d
parent94e3f8516ca45353f49af39c4349b12aa118f287 (diff)
(mkosarek) Updated roadmap
Diffstat (limited to '2d')
-rw-r--r--2d/_collisions/polygon_polygon.html4
-rwxr-xr-x2d/_collisions/polygon_polygon/dist/output.wasmbin57769 -> 57746 bytes
-rw-r--r--2d/_collisions/polygon_polygon/main.cpp5
3 files changed, 6 insertions, 3 deletions
diff --git a/2d/_collisions/polygon_polygon.html b/2d/_collisions/polygon_polygon.html
index 2e22f49..f401385 100644
--- a/2d/_collisions/polygon_polygon.html
+++ b/2d/_collisions/polygon_polygon.html
@@ -255,6 +255,10 @@
<br /> <br />
I'm sure someone more inclined to proving mathematical truities would love to describe this to you, but, for all intents and purposes, this intutitive understanding is good enough for us. We just want to make games, anyhow.
+ <br />
+
+ <h3>Finding which point causes the intersection</h3>
+
</p>
</section>
<section>
diff --git a/2d/_collisions/polygon_polygon/dist/output.wasm b/2d/_collisions/polygon_polygon/dist/output.wasm
index d865038..f4ef9bb 100755
--- a/2d/_collisions/polygon_polygon/dist/output.wasm
+++ b/2d/_collisions/polygon_polygon/dist/output.wasm
Binary files differ
diff --git a/2d/_collisions/polygon_polygon/main.cpp b/2d/_collisions/polygon_polygon/main.cpp
index ff01e52..e85cc25 100644
--- a/2d/_collisions/polygon_polygon/main.cpp
+++ b/2d/_collisions/polygon_polygon/main.cpp
@@ -403,8 +403,6 @@ void update(float32 deltaTimeSeconds, void* userData) {
continue;
}
- printf("Might intersect\n");
-
first->calculateTransformedVertices();
second->calculateTransformedVertices();
@@ -416,13 +414,14 @@ void update(float32 deltaTimeSeconds, void* userData) {
// Handle collison here
IntersectionResult irCopy = ir;
float32 copyDt = deltaTimeSeconds;
+ float32 subdivisionDt = copyDt / 8.f;
do {
first->restorePreviousBody();
second->restorePreviousBody();
ir = irCopy;
- copyDt = copyDt /= 2.f;
+ copyDt = copyDt - subdivisionDt;
first->update(copyDt);
second->update(copyDt);