FlxQuadTree usage example
-
Hi all,
Could anyone point to or provide an example of usage of FlxQuadTree? I could not find any so far.
Thanks!
-
It's used internally for
FlxG.overlap()
/FlxG.collide()
, and not typically used directly.What are you trying to do?
-
I thought it would help implement an efficient collision detection... I have entities located in a rectangular cell in the world, and I need to check whether the player is in the same cell of one of them (and need to know which one).
EDIT: thanks for pointing out it's an internal class.
-
Yes, as Gama11 said,
FlxG.overlap()
already does that for you, it uses FlxQuadTree for more efficient collision detection.