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

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



Duration: 26:53
1,037 views
0


In this tutorial, I go over the implementation of detecting a collision 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 Cohen Sutherland clipping 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
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







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