I am working in a 2D collision system where I need to detect a collision of a rectangle on a grid, but since the rectangle may be fast enough to jump more than one of the grid squares (sometimes several) I need to check collision of everything in the middle of point A to B.
Does anyone know a way to achieve that?
In the image below, I am starting at point A and in one update it's at point B. I would need to check collision on the whole gray area. As you can see in the image, the rectangle don't need to be on a fixed position on the grid.
The grid squares in my case have 30x30 pixels and the rectangle has 35x65. My grid is also on a list, but this can change if needed.
Thank you in advance for any help.