Triangle vs. Box Collision Detection Theory | Coding Geometry Dash in Java #24

Channel:
Subscribers:
59,400
Published on ● Video Link: https://www.youtube.com/watch?v=513Gj6oOXE0



Duration: 20:14
1,345 views
0


In this tutorial, I go over the mathematics and theory behind how to detect if a collision is occuring between a box and a triangle. For this tutorial I use to techniques, the first is rotating points about an origin, this is so that the triangle and box are aligned along the same coordinate axes, then I go over using Bresenham's line algorithm to detect a collision. Cohen Sutherland Algorithm is a clipping algorithm that was used for CPU graphics in the 80's and 90's, but it can be applied to this problem to determine whether a triangle is "clipping" a box.

Source for Rotation: http://www.sunshine2k.de/articles/RotationDerivation.pdf
Ptolemys Theorem: https://en.wikipedia.org/wiki/Ptolemy%27s_theorem
Cohen Sutherland Algorithm: https://www.geeksforgeeks.org/line-clipping-set-1-cohen-sutherland-algorithm/

---------------------------------------------------------------------
Website: https://ambrosiogabe.github.io/
Github: https://github.com/ambrosiogabe

Outro Music: https://www.bensound.com/royalty-free-music




Other Videos By GamesWithGabe


2020-03-22Physics and Stuff | Cocoa Engine Devlog #4
2020-03-17LWJGL, Batching, and Font Rendering | Cocoa Engine Devlog #3
2020-03-06Bug Fixing | Coding Geometry Dash in Java #30
2020-03-04Box Triggers and Portals | Coding Geometry Dash in Java #29
2020-02-28Box-Select, Deleting, and Rotating Selected Objects | Coding Geometry Dash in Java #28
2020-02-26Duplication and Moving Selected Objects | Coding Geometry Dash in Java #27
2020-02-24Switching Languages | Cocoa Engine Devlog #2
2020-02-21Multi-Select in Level Editor | Coding Geometry Dash in Java #26
2020-02-19Triangle vs. Box Collision Detection | Coding Geometry Dash in Java #25
2020-02-17Why Minecraft is a Technical Feat | Explaining the Engineering Behind an Indie Icon
2020-02-14Triangle vs. Box Collision Detection Theory | Coding Geometry Dash in Java #24
2020-02-12Broadphase Collision Detection | Coding Geometry Dash in Java #23
2020-02-10Natural Language Understanding in Python | Rasa NLU Quickstart
2020-02-07Menu Functionality | Coding Geometry Dash in Java #22
2020-02-05Level Editor Tabs | Coding Geometry Dash in Java #21
2020-01-31Z-Index Rendering | Coding Geometry Dash in Java #20
2020-01-29Parallax Backgrounds | Coding Geometry Dash in Java #19
2020-01-24Collision Resolution | Coding Geometry Dash in Java #18
2020-01-22Collision Detection | Coding Geometry Dash in Java #17
2020-01-17Deserialization Part 2 | Coding Geometry Dash in Java #16
2020-01-15Deserialization Part 1 | Coding Geometry Dash in Java #15



Tags:
gameswithgabe
games with gabe
geometry dash java
triangle vs box collision detection
cohen sutherland algorithm
rotating points about an origin
how to detect collision between triangle and box
collision detection
box collision
triangle collision
how to rotate points
java
collision
physics 2d