Need help with TRIANGLE COLLISION detection

Monkey Forums/Monkey Programming/Need help with TRIANGLE COLLISION detection

doug(Posted 2015) [#1]
I started making a game in GameMaker studio a few months back, but as the game got more complex it became a nightmare to manage so I switch to Monkey X along with ignition X because I liked the way they were structured. I am making a game that using tiles which are basically parallelograms. In GameMaker studio I could use two triangular collision mask to find the entire area of a singe tile. In monkey x or more precisely ignition X it only has rectangle, lines, and circle for collision detections. Does anyone know a way to make triangular or polygon collision detectors; if someone already knows how to do this it would save me the trouble of re-inventing the wheel.


DruggedBunny(Posted 2015) [#2]
Some options here:

Point in Triangle
2D triangle intersection
Concave/convex polygon collisions and other useful functions
point_in_polygon
Point inside convex polygon

Simplest option might be to test each point in one triangle against the other triangle using Point in Triangle.