Questions tagged [collision]
In collision detection problems, the challenge is to determine when shapes intersect each other.
3
questions
32
votes
3
answers
44k
views
Overlapping rectangles
I received the following question in a technical interview today (for a devops/SRE position):
Write a function which returns true if the two rectangles passed to it
as arguments would overlap if ...
4
votes
1
answer
3k
views
Circle - Line segment collision
I wrote an implementation of circle - line segment collision detection algorithm. Here is quick demonstration how it works:
And here is my implementation in Javascript using HTML canvas:
index.html
...
3
votes
1
answer
446
views
Canvas spatial grid collision
You can see a working example here. Be sure to click on the canvas or the key inputs will not be detected!
Are there any ways I could improve upon this? Anything that should have been done ...