Skip to content

FlxCamera follow jitters #4

Open
@moly

Description

@moly

I noticed an ever slight jitter around my playable character when the camera was tracking it. Imagine the sprite jumping a pixel in advance and back the second frame and you get a good idea of the effect I'm talking about.

Poking around the update call in FlxCamera, rounding the coordinates of the game character seemed to fix the issue.

var targetX:Number = int(target.x) + ((target.x > 0)?0.001:-0.001);
var targetY:Number = int(target.y) + ((target.y > 0)?0.001: -0.001);

Can't really tell if it's a bug or not, but I figured I'd toss it out in the open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions