cpSpaceHashRehashObject(space->activeShapes, shape, shape->id);
to update the hash for an active shape I move in my code, when chipmunk is "paused" so no spaceStep is called. When running chipmunk again, active shapes are always rehashed every spaceStep, right. So no need to worry about false positives in the hash.
How about the code of mobilebros:
cpSpaceHashRemove(_space->staticShapes, shape, shape->id);
cpSpaceHashInsert(_space->staticShapes, shape, shape->id, shape->bb);
Will this make a complete rehasing obsolete? Especially when we are talking about static shapes?
Visit our game Blog: or follow us on twitter: