1
General discussions / Simple Triangle Based 2D Collision Detection / Start of a tutorial series
« on: November 09, 2015, 06:44:04 am »
Hey Guys, I've been around SMFL since 1.6 was released and it's the main reason I've stuck with c++ for all my programming needs.
Recently I've been looking a lot more into better Collision detection and finding a simple way to handle that where I can actually understand it instead of just using a random algorithm I found online and brute forcing it.
After 3 weeks trying to understand SAT (separating axis theorem) I stumbled upon a forum post saying.
"Hey look at the area of a triangle, then check a point on another triangle by creating 3 segmented triangles inside the original.
Get those 3 triangle's areas and add them up, if they equal the original triangle's area that point is within the triangle."
Which is really easy for me to visualize and work with.
I figured I'd make a tutorial video explaining it which will hopefully help those with a lesser understanding in maths have awesome collision detection.
If you care to watch it on youtube the link's:
TL;DR: I made a tutorial on collision detection. Let me know what you think about the way I describe it in the video and if you liked it. Also feel free to let me know if that way of checking sucks, lol. kthxbye
Edit: I was trying to keep the tutorial as generic as possible since a lot of people looking for that sort of thing use many languages but my real code directly uses SFML and I'll likely feature SFML as the main part of future tutorials.
Recently I've been looking a lot more into better Collision detection and finding a simple way to handle that where I can actually understand it instead of just using a random algorithm I found online and brute forcing it.
After 3 weeks trying to understand SAT (separating axis theorem) I stumbled upon a forum post saying.
"Hey look at the area of a triangle, then check a point on another triangle by creating 3 segmented triangles inside the original.
Get those 3 triangle's areas and add them up, if they equal the original triangle's area that point is within the triangle."
Which is really easy for me to visualize and work with.
I figured I'd make a tutorial video explaining it which will hopefully help those with a lesser understanding in maths have awesome collision detection.
If you care to watch it on youtube the link's:
TL;DR: I made a tutorial on collision detection. Let me know what you think about the way I describe it in the video and if you liked it. Also feel free to let me know if that way of checking sucks, lol. kthxbye
Edit: I was trying to keep the tutorial as generic as possible since a lot of people looking for that sort of thing use many languages but my real code directly uses SFML and I'll likely feature SFML as the main part of future tutorials.