I would like to know how you handle spatial hashing in terms of updating elements.First of all, I would like to point out, I’m talking about a spatial hash where one object can be referenced in multiple hash-buckets, as it could cross the border from bucket 1 to 2Next would be a game-object’s position being updated, what do or would you do? Rebuild the entire spatial hashing (as its done with octree etc.)? Or would you maybe give each game-object a reference to its hash-buckets to make the game-object instruct deleting your game-object from its list/vector/… inside each hash-bucket referenced?
If you decide to remove and then insert again – as just mentioned – I would be really interested in the way you tidy up all hash-buckets that used to have that particular object – since one object could potentially be referenced in multiple buckets (hit box being on a corner where e.g. 4 buckets meet, as stated in the beginning above).