Scroll factor and bounds

  • Hi, I have FlxSpriteGroup with some FlxSprites ini it. This group has height of game but width is wider as game width.
    I centred this group and than added, map.y, map.width, map.height);

    to set bounds.

    On update:

    override public function update(elapsed: Float) {
            if (FlxG.keys.pressed.LEFT ) {;
            if (FlxG.keys.pressed.RIGHT) {;

    Scroll works fine and limits are correct so camera stops on bounds, but as soon as I change map.scrollFactor.x = 3 it scroll out of bounds. I am doing something wrong?

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.