Collision Detection Between Rotated Rectangles – HTML5 Canvas

Опубликовано: 16 Июнь 2021
на канале: Qixotl LFC
7,733
195

In this video you will learn to how to detect for collisions between rotated rectangles using the Separating Axis Theorem.

In actuality this algorithm will be able to detect for collisions between all polygons providing that they are convex and not conclave. It is just that the demonstration at hand is between two rectangles that can be rotated and moved about in any kind of way, it does not matter how, the collision detection works just the same either way.

📚 Materials/References:
-The finished projects Code Pen page: https://codepen.io/LFCProductions/pen...

🧠 Concepts Covered:
What the separating axis theorem is and how it works.
How to construct a new polygon that reflects another polygon that is rotated.
Rotate a vertex / node around a centre point.

💻 Technologies used:
HTML5 and the canvas API
JavaScript (No jQuery)
CSS (No Bootstrap)

If you enjoyed this video then please consider liking 👍 and subscribing. You would be doing me a huge favour if you did this and it would be greatly appreciated ❤️ by me. Likewise, if you have any queries or comments that you want answered. Then please, don’t hesitate post them down into the comments box below. I would love to hear back from you and will answer all of your questions to the best of my ability.

Stay awesome guys. ❤️

#SeperatingAxisTheorem#ComputerScience#CollisionDetection#HTML5#HTMLCanvas#JavaScript#GameDev#WebDev


Смотрите видео Collision Detection Between Rotated Rectangles – HTML5 Canvas онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Qixotl LFC 16 Июнь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 7,733 раз и оно понравилось 195 людям.