Skip to main content
1 of 4
Liam
  • 55
  • 1
  • 6

Spatial Partitioning - Objects larger than cell?

I'm developing a top down 2D tile based game. Recently I started working on collision detection and have gone down the route of simply using spatial partitioning.

Each object belongs in a cell and checks the neighbouring cells for collisions like this.

enter image description here

However, I realise I'm absolutely going to need to have some collision boxes that are bigger than a single cell.

Are there better algorithms for what I need or is there a simple work around I'm not seeing?

Thanks in advance, still learning so any help is greatly appreciated!

Liam
  • 55
  • 1
  • 6