Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jun 14, 2016
This collision detection test is one of the most complex ones (aside from ray vs. triangle test) and will use an extra function for "projecting" a vector (vector projection formula) onto another vector. This function will be added to our game dev library, we have developed so far. This tutorial explains how to do that!
Because collision test of a sphere/circle with a segment line requires basic knowledge of 90 degree trigonometry operations, dot product function will be used. This is good, because it's already part of our segment library. Projecting a perpendicular vector onto another is a very useful algorithm to have in our game development library arsenal.
And finally, toward the end of this tutorial, there is a special case. We need to make sure that the edges of the lines fall within our circle. It's a secondary part of this algorithm, that needs to be solved separately.