Very well explained! The graphic/animation work was excellent as well. I by know means can re-explain it as good as you did, but it's interesting to see how it's all just a matter of somewhat basic vector math layered on top of each other. Would love to see more content like this in the future :)
This is very interesting. I'd be curious to see one for 3D game collisions although I imagine it'd be a lot more complex. Looking forward to the future devlogs!
Thanks Tyler! I'm also curious about 3D collisions. I believe you can do a similar approach with separating planes but it has more quirky situations that don't quite work.
For polygons vs circles, you can use a voronoi diagram to check which feature of the polygon is the closest vertex or edge), and then use the axis of that feature (for edges it’s the normal, and for vertices treat the vertex as a circle with radius 0)
For 3D, you have to check the normals of each face, and the cross product between each edge of the first against each edge of the second. It’s a lot more computation, so the preferred method is the GJK algorithm
Usually in games there is bounding boxes, game checks bounding boxes first. If bounding boxes overlap then collision checking starts. To decrease numbers of checks normals that pointing away from collision direction (calculated from bounding boxes) could be ignored.
Interesting video! The sound quality didn't seem the best though, seemed like there was a bit of an echo. I don't remember noticing any issues with the sound in your videos before, but you haven't made one in while of course! Good to see you getting back into it, anyway!
3:35 I must be missing something. How do you get to that separation axis in code where you cannot look at the shapes and just draw a line and then take the dot product of that? All the talk after that on projecting onto that separation axis doesn't compute for me, because I don't know how to get to that axis.
I want to try both this and signed distance functions. Won't these slow down my game if every entity is checking each other one? Maybe I have to use an oct-tree too?
Wouldn’t it be more efficient to check if circles overlap by checking if the distance between their center points is less than the sum of their radii?
It would if you're only comparing circles but the approach I outlined in the video allows circles to be compared against any other convex shapes.
This is a really high quality video; I'm shocked it only has 3k views as it was the first result when searching.
Very well explained! The graphic/animation work was excellent as well. I by know means can re-explain it as good as you did, but it's interesting to see how it's all just a matter of somewhat basic vector math layered on top of each other. Would love to see more content like this in the future :)
Thanks Garrett! I'm glad you enjoyed the video. I will definitely look to do more similar stuff soon.
It's always interesting to see how the maths works in the background to do all this stuff. Good on you for doing the calculations yourself!
Yes it's super interesting. Thank you for watching!
Great video mate, I always wondered how the magic happened in game engines and now I'm a little wiser
Thanks Tauheed! I'm glad you learnt something.
This is very interesting. I'd be curious to see one for 3D game collisions although I imagine it'd be a lot more complex. Looking forward to the future devlogs!
Thanks Tyler!
I'm also curious about 3D collisions. I believe you can do a similar approach with separating planes but it has more quirky situations that don't quite work.
Great video with simple explanations for a relatively complex topic.
Thanks Kaleva! I'm glad you think so.
Good video! I remember collisions being confusing when I first made games in C++
Thank you! They definitely are confusing and daunting when you first come across them.
Thank you! I find your pace of explaining perfect.
For polygons vs circles, you can use a voronoi diagram to check which feature of the polygon is the closest vertex or edge), and then use the axis of that feature (for edges it’s the normal, and for vertices treat the vertex as a circle with radius 0)
This is quite complicated, but very well explained! Nice job😁
Thank you Shelf! 😊
for circles you could just check if: distance(form circle 1 to circle 2) < circle 1 radius + circle 2 radius
Hype! Glad to see your videos again! :D
Found this really interesting and easy to follow, looking forward to more like this!
Thanks Saul! I'm glad it was easy to follow along.
The visuals made it click for me! Such simple but elegant solution .
Im guessing it works the same in 3D but with Vector3 normals
For 3D, you have to check the normals of each face, and the cross product between each edge of the first against each edge of the second. It’s a lot more computation, so the preferred method is the GJK algorithm
Great video, both the explanation and visuals! Keep it up!
Much appreciated Robin!
Usually in games there is bounding boxes, game checks bounding boxes first. If bounding boxes overlap then collision checking starts. To decrease numbers of checks normals that pointing away from collision direction (calculated from bounding boxes) could be ignored.
Yes, games often use bounding boxes to help improve their performance, especially when they have lots of complex polygons.
Not just bounding box but axis aligned bounding box (aabb) making it even faster!
Very informative good job. Increadible editing too, very well presented!
Thank you Ginger. I'm glad you liked it!
one day, one day i shall make a game with diagonal map colisions
Go for it bud!
Interesting video! The sound quality didn't seem the best though, seemed like there was a bit of an echo. I don't remember noticing any issues with the sound in your videos before, but you haven't made one in while of course! Good to see you getting back into it, anyway!
Thanks! I'll have to see if I can improve the audio quality.
@@Skeffles That'd be good, good luck with it!
interesting video! you explain it really well!
Glad you think so. Thanks Valentine!
Fantastic, thank you!
nice. Great explanations
Thank you David!
3:35 I must be missing something. How do you get to that separation axis in code where you cannot look at the shapes and just draw a line and then take the dot product of that?
All the talk after that on projecting onto that separation axis doesn't compute for me, because I don't know how to get to that axis.
I want to try both this and signed distance functions. Won't these slow down my game if every entity is checking each other one? Maybe I have to use an oct-tree too?
Hey Skeffles long time no see, cool video, I've done something like this to test collisions but never know how it's called.
Hey Genpaku, thank you!
It's definitely not an easy to find thing when you first start out. I'm hoping this video helps with that.
5:43 wait, they're just circles. Isn't it just checking if the distance between the two is less than the sum of their radii? No projection needed.
That is the case if you're only using circles. The method I outlined in the video allows for checking circles against any convex shape.
how about just intersections and overlap
A better approach is the GJK algorithm
ua-cam.com/video/ajv46BSqcK4/v-deo.html