private var _bulletGroup:FlxSpriteGroup;
private var _enemyGroup:FlxTypedGroup<Enemy>;
override public function update():Void
{
super.update();
hero.update();
_bulletGroup.update();
_enemyGroup.update();
FlxG.overlap(_bulletGroup, _enemyGroup, bulletHitEnemyCallBack); ///returns true always when needed.
FlxG.collide(_bulletGroup, _enemyGroup, bulletHitEnemyCallBack); ///returns false even if the overlap returns true
FlxG.collide(hero, _enemyGroup); ///works, no such problem.
}
I have removed the unnecessary parts, so basically this is how I'm using the functions. Worth to mention that the bullets are going at a 500frame/sec using the veclocity variable. I always call the super.update() before my logic.
On the second thought, it can be caused by the high speed of the bullet, but then how is the overlap returns true? I have tried to set the FlxObject.SEPARATE_BIAS to 1 (default 4), but didn't affect the outcome.