Yes, it seems GKOctree is buggy and basically not usable– a shame, Apple does not at all respond to such "minor" bug reports for so many years :(
I resorted to using an own Octree class, which I based on the work by the Swift Algorithm Club (https://github.com/kodecocodes/swift-algorithm-club/).
I have fixed a couple of glitches with their code, refined it, and added missing features like elements covering a whole region (instead of just a point), just as the Apple GKOctree does. It further now respects the minimumCellSize parameter, and it auto-prunes when you remove elements. Feel free to use this instead of GameplayKits buggy version:
https://github.com/mabi99/swift-algorithm-club
(note: this is a LOT of algorithms in this, you can simply copy the Octree.swift file and use it!
Topic:
Graphics & Games
SubTopic:
General
Tags: