Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlxCamera follow jitters #227

Open
volvis opened this issue May 1, 2012 · 0 comments
Open

FlxCamera follow jitters #227

volvis opened this issue May 1, 2012 · 0 comments

Comments

@volvis
Copy link

volvis commented May 1, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant