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

FlxG.camera.shake() shows white background when used #753

Closed
jcomack opened this issue Jan 1, 2014 · 2 comments

Comments

@jcomack
Copy link

commented Jan 1, 2014

I'm running into an issue where when I use FlxG.camera.shake(), I can see white background surrounding the camera.

Is there a way of using shake where is shows the surrounding map instead of shaking (what seems to be) the actual view/camera?

@Gama11

This comment has been minimized.

Copy link
Member

commented Jan 1, 2014

You simply need to extend the camera dimensions a bit:

var ext = 50;
FlxG.camera.setSize(FlxG.width + ext, FlxG.height + ext);
FlxG.camera.setPosition( - ext / 2, - ext / 2);
@gamedevsam

This comment has been minimized.

Copy link
Member

commented Jan 2, 2014

This type of API usage question is better suited for the HaxeFlixel forums.

@gamedevsam gamedevsam closed this Jan 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.